總覽
實作「投放」按鈕的 UIButton 子類別。
- 開始時間
- 3.0
沿用 UIButton。
執行個體方法摘要 | |
(instancetype) | - initWithCoder: |
使用指定的解碼器建構新的 GCKUICastButton。更多... | |
(instancetype) | - initWithFrame: |
使用指定的頁框建構新的 GCKUICastButton。更多... | |
(void) | - setInactiveIcon:activeIcon:animationIcons: |
設定按鈕有效、無效和動畫狀態的圖示。更多... | |
(void) | - setAccessibilityLabel:forCastState: |
設定按鈕的投放狀態無障礙標籤。更多... | |
資源摘要 | |
BOOL | triggersDefaultCastDialog |
此標記表示這個按鈕上的觸控事件是否會觸發架構提供的投放對話方塊。更多... | |
id< GCKUICastButtonDelegate > | delegate |
設定委派,以回應在 GCKUICastButton 上執行的使用者動作。更多... | |
方法詳細資料
- (instancetype) initWithCoder: | (NSCoder *) | decoder |
使用指定的解碼器建構新的 GCKUICastButton。
- (instancetype) initWithFrame: | (CGRect) | frame |
使用指定的頁框建構新的 GCKUICastButton。
- (void) setInactiveIcon: | (UIImage *) | inactiveIcon | |
activeIcon: | (UIImage *) | activeIcon | |
animationIcons: | (NSArray< UIImage * > *) | animationIcons | |
設定按鈕有效、無效和動畫狀態的圖示。
提供的圖片應為單色背景且透明背景。圖片的顏色並不重要,因為按鈕的色調 (tintColor
屬性) 會決定最終呈現的顏色。
- (void) setAccessibilityLabel: | (NSString *) | label | |
forCastState: | (GCKCastState) | state | |
設定按鈕的投放狀態無障礙標籤。
建議您為按鈕設定無障礙標籤。透過 setAccessibilityLabel 設定的標籤:會套用至所有投放狀態。
資源詳細資料
|
readwritenonatomicassign |
此標記表示這個按鈕上的觸控事件是否會觸發架構提供的投放對話方塊。
此屬性的預設值為 YES
。如果應用程式想要處理觸控事件本身,則應將屬性設為 NO
,並為觸控事件註冊適當的目標和動作。如果將 delegate
設為非空值,這個屬性就無法設為 NO。
- Deprecated:
- 使用 GCKUICastButtonDelegate 方法回應投放按鈕的使用者動作。
|
readwritenonatomicweak |
設定委派,以回應在 GCKUICastButton
上執行的使用者動作。
如果已淘汰的屬性 triggersDefaultCastDialog
設為 NO,委派代表不應設為非空值,
- 開始時間
- 4.6.0