GCKUICastButton Class

Stay organized with collections Save and categorize content based on your preferences.
GCKUICastButton Class Reference

Overview

A subclass of UIButton that implements a "Cast" button.

Since
3.0

Inherits UIButton.

Instance Method Summary

(instancetype) - initWithCoder:
 Constructs a new GCKUICastButton using the given decoder. More...
 
(instancetype) - initWithFrame:
 Constructs a new GCKUICastButton with the given frame. More...
 
(void) - setInactiveIcon:activeIcon:animationIcons:
 Sets the icons for the active, inactive, and animated states of the button. More...
 
(void) - setAccessibilityLabel:forCastState:
 Sets the accessibility label for the cast states of the button. More...
 

Property Summary

BOOL triggersDefaultCastDialog
 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...
 
id< GCKUICastButtonDelegatedelegate
 Set the delegate to respond to the user actions performed on the GCKUICastButton. More...
 

Method Detail

- (instancetype) initWithCoder: (NSCoder *)  decoder

Constructs a new GCKUICastButton using the given decoder.

- (instancetype) initWithFrame: (CGRect)  frame

Constructs a new GCKUICastButton with the given 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.

Property Detail

- (BOOL) triggersDefaultCastDialog
readwritenonatomicassign

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.
- (id<GCKUICastButtonDelegate>) delegate
readwritenonatomicweak

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