<GCKUICastButtonDelegate> Protocol
Stay organized with collections
Save and categorize content based on your preferences.
Use the methods of this protocol to present custom dialog in response to user action.
- Since
- 4.6.0
Inherits <UIButtonNSObject>.
- (void) castButtonDidTapToPresentLocalNetworkAccessPermissionDialog: |
|
(GCKUICastButton *) |
castButton |
|
|
optional |
Tells the delegate that the cast button is tapped by the user for the first time on iOS14 or above and cast devices discovery has not started in the current or previous app sessions.
Implement this method to present the custom dialog. If not implmemented, the default dialog is presented.
- Parameters
-
- (void) castButtonDidTap: |
|
(GCKUICastButton *) |
castButton |
toPresentDialogForCastState: |
|
(GCKCastState) |
castState |
|
|
| |
|
optional |
Tells the delegate that the cast button is tapped by the user after the discovery has been initiated in current or previous app session.
Implement this method to present the custom dialog as per the cast state. Observe GCKCastContext::castState to update the dialog dynamically as per changes in the cast state. If not implmemented, the default dialog is presented.
- Parameters
-
castButton | Instance of GCKUICastButton tapped. |
castState | Cast state when the cast button is tapped. |
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."],[[["The `GCKUICastButtonDelegate` protocol allows developers to present custom dialogs in response to user interactions with the Cast button."],["It provides two optional methods: `castButtonDidTapToPresentLocalNetworkAccessPermissionDialog:` and `castButtonDidTap:toPresentDialogForCastState:`."],["`castButtonDidTapToPresentLocalNetworkAccessPermissionDialog:` is called the first time the Cast button is tapped on iOS 14 or later, before device discovery has begun."],["`castButtonDidTap:toPresentDialogForCastState:` is called on subsequent taps of the Cast button, after device discovery has started, allowing for custom dialogs based on the current cast state."],["If these methods are not implemented, default dialogs will be presented."]]],["The `GCKUICastButtonDelegate` protocol allows for custom dialog presentation in response to user interactions with a cast button. It has two key instance methods: `castButtonDidTapToPresentLocalNetworkAccessPermissionDialog:` is triggered when the user taps the cast button for the first time on iOS 14+ without prior device discovery and allows to present a permission dialog. `castButtonDidTap:toPresentDialogForCastState:` is triggered when the user taps the button after device discovery has been initiated, allowing a custom dialog based on the cast state. If neither is implemented, the default dialog is displayed.\n"]]