總覽
UIButton 子類別,用於實作「投放」按鈕。
- 辛策
- 3.0
沿用 UIButton。
執行個體方法摘要 | |
(instancetype) | - initWithCoder: |
使用指定的解碼器建構新的 GCKUICastButton。更多... | |
(instancetype) | - initWithFrame: |
使用指定的頁框建構新的 GCKUICastButton。更多... | |
(void) | - setInactiveIcon:activeIcon:animationIcons: |
設定按鈕的有效、已停用和動畫狀態的圖示。更多... | |
(void) | - setAccessibilityLabel:forCastState: |
為按鈕的投放狀態設定無障礙標籤。更多... | |
屬性摘要 | |
BOOL | triggersDefaultCastDialog |
此標記指出此按鈕上的觸控事件是否會觸發架構所提供的 Cast 對話方塊。更多... | |
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 |
此標記指出此按鈕上的觸控事件是否會觸發架構所提供的 Cast 對話方塊。
此屬性預設為 YES
。如果應用程式想要自行處理觸控事件,則應將屬性設為 NO
,並為觸控事件註冊適當的目標和動作。如果 delegate
設為非零值,則這項屬性無法設為「否」。
- Deprecated:
- 使用 GCKUICastButtonDelegate 方法回應投放按鈕上的使用者動作。
|
readwritenonatomicweak |