Google ใช้เทคโนโลยี AI เพื่อแปลเนื้อหาเป็นภาษาที่คุณต้องการ การแปลโดย AI อาจมีข้อผิดพลาด
<GCKUICastButtonDelegate> โปรโตคอล
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
ใช้วิธีการของโปรโตคอลนี้ในการนำเสนอกล่องโต้ตอบที่กำหนดเองเพื่อตอบสนองต่อการดำเนินการของผู้ใช้
- Since
- 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 Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-25 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"]],["อัปเดตล่าสุด 2025-07-25 UTC"],[],["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"]]