概览
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
设置为非 nil 值,则此属性不能设置为 NO。
- Deprecated:
- 使用 GCKUICastButtonDelegate 方法来响应投射按钮上的用户操作。
|
readwritenonatomicweak |
设置委托来响应在 GCKUICastButton
上执行的用户操作。
如果已弃用的属性 triggersDefaultCastDialog
设置为 NO,则委托不应设置为非 nil 值。
- 开始时间
- 4.6.0