AI-generated Key Takeaways
-
The
GCKUICastButtonDelegate
protocol allows developers to present custom dialogs in response to user interactions with the Cast button. -
It provides two optional methods:
castButtonDidTapToPresentLocalNetworkAccessPermissionDialog:
andcastButtonDidTap: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.
Overview
Use the methods of this protocol to present custom dialog in response to user action.
- Since
- 4.6.0
Inherits <UIButtonNSObject>.
Instance Method Summary | |
(void) | - castButtonDidTapToPresentLocalNetworkAccessPermissionDialog: |
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. More... | |
(void) | - castButtonDidTap:toPresentDialogForCastState: |
Tells the delegate that the cast button is tapped by the user after the discovery has been initiated in current or previous app session. More... | |
Method Detail
|
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
-
castButton Instance of GCKUICastButton
tapped.
|
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.