GCKUICastButton Class
Stay organized with collections
Save and categorize content based on your preferences.
A subclass of UIButton
that implements a "Cast" button.
- Since
- 3.0
Inherits UIButton.
Sets the icons for the active, inactive, and animated states of the button. More...
Sets the accessibility label for the cast states of the button. More...
A flag that indicates whether a touch event on this button will trigger the display of the Cast dialog that is provided by the framework. More...
- (instancetype) initWithCoder: |
|
(NSCoder *) |
decoder
|
|
- (instancetype) initWithFrame: |
|
(CGRect) |
frame
|
|
- (void) setInactiveIcon: |
|
(UIImage *) |
inactiveIcon
|
activeIcon: |
|
(UIImage *) |
activeIcon
|
animationIcons: |
|
(NSArray< UIImage * > *) |
animationIcons
|
|
|
|
|
Sets the icons for the active, inactive, and animated states of the button.
The supplied images should all be single-color with a transparent background. The color of the images is not significant, as the button's tint color ( tintColor
property) determines the color that they are rendered in.
- (void) setAccessibilityLabel: |
|
(NSString *) |
label
|
forCastState: |
|
(GCKCastState) |
state
|
|
|
|
|
Sets the accessibility label for the cast states of the button.
This is the recommended way to set accessibility label for the button. Label set by setAccessibilityLabel: is applied to all cast states.
- (BOOL) triggersDefaultCastDialog
read
write
nonatomic
assign
A flag that indicates whether a touch event on this button will trigger the display of the Cast dialog that is provided by the framework.
By default this property is set to YES
. If an application wishes to handle touch events itself, it should set the property to NO
and register an appropriate target and action for the touch event. This property cannot be set to NO if delegate
is set to non-nil value.
- Deprecated:
- Use GCKUICastButtonDelegate
methods to respond to user actions on the cast button.
read
write
nonatomic
weak
Set the delegate to respond to the user actions performed on the GCKUICastButton
.
Delegate should not be set to non-nil value if the deprecated property triggersDefaultCastDialog
is set to NO.
- Since
- 4.6.0
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License
, and code samples are licensed under the Apache 2.0 License
. For details, see the Google Developers Site Policies
. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-09-18 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-09-18 UTC."],[[["\u003cp\u003eGCKUICastButton is a subclass of UIButton that provides a pre-built "Cast" button for iOS applications.\u003c/p\u003e\n"],["\u003cp\u003eIt allows customization of icons for active, inactive, and animated states, as well as accessibility labels for different cast states.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can handle touch events themselves or utilize the built-in Cast dialog triggered by the button.\u003c/p\u003e\n"],["\u003cp\u003eA delegate can be assigned to respond to user actions on the button, providing further customization options.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003etriggersDefaultCastDialog\u003c/code\u003e property is deprecated in favor of using the \u003ccode\u003eGCKUICastButtonDelegate\u003c/code\u003e for handling user interactions.\u003c/p\u003e\n"]]],[],null,[]]