<GCKUICastButtonDelegate> 协议
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
使用此协议的方法显示自定义对话框来响应用户操作。
- 开始时间
- 4.6.0
继承 <UIButtonNSObject>。
| - (void) castButtonDidTapToPresentLocalNetworkAccessPermissionDialog: |
|
(GCKUICastButton *) |
castButton |
|
|
optional |
告知受托人,在 iOS14 或更高版本上,用户首次点按投射按钮,且投射设备发现未在当前或以前的应用会话中启动。
实现此方法以显示自定义对话框。如果未实现,系统会显示默认对话框。
- Parameters
-
| - (void) castButtonDidTap: |
|
(GCKUICastButton *) |
castButton |
| toPresentDialogForCastState: |
|
(GCKCastState) |
castState |
|
|
| |
|
optional |
告知委托,在当前或上一个应用会话中发起发现后,用户点按了投射按钮。
实现此方法以根据投射状态显示自定义对话框。观察 GCKCastContext::castState,以根据投射状态的变化动态更新对话框。如果未实现,系统会显示默认对话框。
- Parameters
-
| castButton | Instance of GCKUICastButton tapped. |
| castState | Cast state when the cast button is tapped. |
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-25。
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["没有我需要的信息","missingTheInformationINeed","thumb-down"],["太复杂/步骤太多","tooComplicatedTooManySteps","thumb-down"],["内容需要更新","outOfDate","thumb-down"],["翻译问题","translationIssue","thumb-down"],["示例/代码问题","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-07-25。"],[],["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"]]