کلاس GCKUIImageHints
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
شیئی که نکاتی را در مورد نوع و اندازه تصویری که برای نمایش در رابط کاربری انتخاب می شود به GCKUIImagePicker ارائه می دهد.
- از آنجا که
- 3.0
NSObject، <NSCopying> و <NSSecureCoding> را به ارث می برد.
اولیه ساز راحتی
داده های سفارشی را روی nil
تنظیم می کند.
- Parameters
-
imageType | The image type. |
imageSize | The image size. |
- (instancetype) initWithImageType: |
|
( GCKMediaMetadataImageType ) |
imageType |
imageSize: |
|
(CGSize) |
imageSize |
customData: |
|
(nullable NSObject< NSSecureCoding > *) |
customData |
|
|
| |
مقداردهی اولیه تعیین شده
- Parameters
-
imageType | The image type. |
imageSize | The image size. |
customData | The arbitrary custom data that can be used by a custom GCKUIImagePicker to select an image. |
اندازه ای که تصویر در آن نمایش داده می شود.
- (NSObject<NSSecureCoding>*) customData |
|
read nonatomic copy |
داده های سفارشی اختیاری که می توانند برای شناسایی تصویر استفاده شوند.
باید با کدگذاری با مقدار کلید مطابقت داشته باشد.
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2025-07-24 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-07-24 بهوقت ساعت هماهنگ جهانی."],[[["\u003cp\u003e\u003ccode\u003eGCKUIImageHints\u003c/code\u003e provides hints to \u003ccode\u003eGCKUIImagePicker\u003c/code\u003e about the desired image type and size for UI display.\u003c/p\u003e\n"],["\u003cp\u003eIt includes properties for image type, size, and optional custom data for image identification.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can use provided initializers to create \u003ccode\u003eGCKUIImageHints\u003c/code\u003e instances with desired attributes.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ecustomData\u003c/code\u003e property can be leveraged by custom \u003ccode\u003eGCKUIImagePicker\u003c/code\u003e implementations for image selection logic.\u003c/p\u003e\n"],["\u003cp\u003eThis class helps optimize image selection for display within Cast-enabled applications.\u003c/p\u003e\n"]]],["The `GCKUIImageHints` class provides image selection hints to a `GCKUIImagePicker`. Key actions include initializing the object with `-initWithImageType:imageSize:` or `-initWithImageType:imageSize:customData:`, the later being the designated initializer. Information includes `imageType` to specify the type, `imageSize` indicating display dimensions, and optional `customData` for unique image identification, compliant with key-value coding. These properties help determine the suitable image to display in the user interface.\n"],null,["# GCKUIImageHints Class\n\n[Instance Methods](#pub-methods) \\| [Properties](#properties) \nGCKUIImageHints Class Reference \n\nOverview\n--------\n\nAn object that provides hints to a [GCKUIImagePicker](/cast/docs/reference/ios/protocol_g_c_k_u_i_image_picker-p \"An object used for selecting an image for a given purpose from a GCKMediaMetadata object...\") about the type and size of an image to be selected for display in the UI.\n\nSince\n: 3.0\n\nInherits NSObject, \\\u003cNSCopying\\\u003e, and \\\u003cNSSecureCoding\\\u003e.\n\n|----------------|-----------------------------------------------------------------------------------------------------------------------------------------|\n| Instance Method Summary ----------------------- ||\n| (instancetype) | - [initWithImageType:imageSize:](/cast/docs/reference/ios/interface_g_c_k_u_i_image_hints#acede4f0eb0c9659da591448d7dd5f855) |\n| | Convenience initializer. [More...](#acede4f0eb0c9659da591448d7dd5f855) |\n| ||\n| (instancetype) | - [initWithImageType:imageSize:customData:](/cast/docs/reference/ios/interface_g_c_k_u_i_image_hints#a261c4b1b23155b8aa7e4b54faa7349e9) |\n| | Designated initializer. [More...](#a261c4b1b23155b8aa7e4b54faa7349e9) |\n| ||\n\n|------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------|\n| Property Summary ---------------- ||\n| [GCKMediaMetadataImageType](/cast/docs/reference/ios/g_c_k_u_i_image_hints_8h#a31bf487ba9561c0c807a4ee3a42676d8) | [imageType](/cast/docs/reference/ios/interface_g_c_k_u_i_image_hints#a4a31f0af741972a760ae23785452b414) |\n| | The image type. [More...](#a4a31f0af741972a760ae23785452b414) |\n| ||\n| CGSize | [imageSize](/cast/docs/reference/ios/interface_g_c_k_u_i_image_hints#ad21984455c091ed204738b1ec9714c6a) |\n| | The size at which the image will be displayed. [More...](#ad21984455c091ed204738b1ec9714c6a) |\n| ||\n| NSObject\\\u003c NSSecureCoding \\\u003e \\* | [customData](/cast/docs/reference/ios/interface_g_c_k_u_i_image_hints#a27a229a3843e96e1d995d5e20d7580dc) |\n| | Optional custom data that can be used to identify the image. [More...](#a27a229a3843e96e1d995d5e20d7580dc) |\n| ||\n\nMethod Detail\n-------------\n\n|-------------------------------------|---|--------------------------------------------------------------------------------------------------------------------|-------------|\n| - (instancetype) initWithImageType: | | ([GCKMediaMetadataImageType](/cast/docs/reference/ios/g_c_k_u_i_image_hints_8h#a31bf487ba9561c0c807a4ee3a42676d8)) | *imageType* |\n| imageSize: | | (CGSize) | *imageSize* |\n| | | | |\n\nConvenience initializer.\n\nSets the custom data to `nil`.\n\nParameters\n:\n\n |-----------|-----------------|\n | imageType | The image type. |\n | imageSize | The image size. |\n\n\n|-------------------------------------|---|--------------------------------------------------------------------------------------------------------------------|--------------|\n| - (instancetype) initWithImageType: | | ([GCKMediaMetadataImageType](/cast/docs/reference/ios/g_c_k_u_i_image_hints_8h#a31bf487ba9561c0c807a4ee3a42676d8)) | *imageType* |\n| imageSize: | | (CGSize) | *imageSize* |\n| customData: | | (nullable NSObject\\\u003c NSSecureCoding \\\u003e \\*) | *customData* |\n| | | | |\n\nDesignated initializer.\n\nParameters\n:\n\n |------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n | imageType | The image type. |\n | imageSize | The image size. |\n | customData | The arbitrary custom data that can be used by a custom [GCKUIImagePicker](/cast/docs/reference/ios/protocol_g_c_k_u_i_image_picker-p \"An object used for selecting an image for a given purpose from a GCKMediaMetadata object...\") to select an image. |\n\n\nProperty Detail\n---------------\n\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------|\n| |--------------------------------------------------------------------------------------------------------------------------------| | - ([GCKMediaMetadataImageType](/cast/docs/reference/ios/g_c_k_u_i_image_hints_8h#a31bf487ba9561c0c807a4ee3a42676d8)) imageType | | readnonatomicassign |\n\nThe image type. \n\n|---------------------------------------------------|---------------------|\n| |----------------------| | - (CGSize) imageSize | | readnonatomicassign |\n\nThe size at which the image will be displayed. \n\n|-------------------------------------------------------------------------------------------------|-------------------|\n| |---------------------------------------------| | - (NSObject\\\u003cNSSecureCoding\\\u003e\\*) customData | | readnonatomiccopy |\n\nOptional custom data that can be used to identify the image.\n\nIt must be key-value coding compliant."]]