<GCKUICastButtonDelegate> プロトコル
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
このプロトコルのメソッドを使用して、ユーザーの操作に応じてカスタム ダイアログを表示します。
- 開始:
- 4.6.0
<UIButtonNSObject> を継承します。
- (void) castButtonDidTapToPresentLocalNetworkAccessPermissionDialog: |
|
(GCKUICastButton *) |
castButton |
|
|
optional |
iOS 14 以降でユーザーが初めてキャスト アイコンをタップしたことと、現在または以前のアプリ セッションでキャスト デバイスの検出が開始されていないことを、委任者に伝えます。
このメソッドを実装して、カスタム ダイアログを表示します。設定されていない場合は、デフォルトのダイアログが表示されます。
- 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 Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2023-12-01 UTC。
[[["わかりやすい","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 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"]]