<GCKUICastButton 委派> 通訊協定(&T)
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
透過這個通訊協定的方法顯示自訂對話方塊,以回應使用者動作。
- 開始時間
- 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. |
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2023-12-01 (世界標準時間)。
[[["容易理解","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"]],["上次更新時間:2023-12-01 (世界標準時間)。"],[[["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."]]],[]]