คลาส GANSearchAdController
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
ดึงข้อมูลโฆษณา Search และทำให้พร้อมใช้งานสำหรับลูกค้าของ SDK
รับค่า NSObject
เริ่มต้นตัวควบคุมโฆษณา
- Parameters
-
publisherID | The publisher id, e.g. "ms-app-pub-9616389000213823". |
styleID | The settings id for the template that will be used to render native ads. |
options | GANSearchAdControllerOptions, such as adTest, and adSafe, etc. |
delegate | GANSearchAdControllerDelegate for receiving notifications when ads are loaded and other events. |
เรียกดูหน้าแรกของโฆษณาสําหรับ adRequest
และหน้าต่อๆ ไปแบบไม่พร้อมกัน หากจำเป็น
วิธีการนี้ควรถูกเรียกเพียงครั้งเดียวต่อคำขอเท่านั้น เมื่อระบบโหลดโฆษณาใหม่ (หรือโหลดไม่สำเร็จ) ระบบจะเรียกใช้ GANSearchAdControllerDelegate
ในเทรดหลัก
- Parameters
-
เรียกข้อมูลหน้าถัดไปของโฆษณาสำหรับคำขอก่อนหน้าที่ระบุโดยการเรียกล่าสุดไปยัง loadAds:
แบบไม่พร้อมกัน
หากไม่มีการเรียก loadAds:
ระบบจะแสดงข้อผิดพลาดผ่าน GANSearchAdControllerDelegate
หากมีโฆษณาเต็มหน้าที่ยังไม่ได้แสดง ระบบก็จะแสดงข้อผิดพลาดไปยังผู้รับมอบสิทธิ์ด้วย
แสดงจำนวนโฆษณาทั้งหมดที่โหลดจากการเรียกล่าสุดไปยัง loadAds:
สร้าง adView ที่ว่างเปล่า
- (void) populateAdView: |
|
(GANAdView *) |
view |
identifier: |
|
(NSString *) |
adIdentifier |
|
|
| |
สร้าง adView ด้วยโฆษณาที่ระบุโดยตัวระบุ
- หาก
adIdentifier
เป็นตัวระบุใหม่ มุมมองจะแสดงโฆษณาถัดไปที่มีอยู่
- หากใช้
adIdentifier
อยู่แล้ว มุมมองจะแสดงโฆษณาเดียวกันกับที่แสดงในครั้งแรกที่มีการเรียกเมธอดนี้ด้วย adIdentifier
- Parameters
-
view | The GANAdView to populate. |
adIdentifier | An ad identifier used to identify this ad. This can be any NSString. Each unique string will be assigned to the next available ad until ads are exhausted. |
- (void) populateAdView: |
|
(GANAdView *) |
view |
identifier: |
|
(NSString *) |
adIdentifier |
completionHandler: |
|
(GANAdViewPopulatedCompletionHandler) |
completionHandler |
|
|
| |
สร้าง adView ด้วยโฆษณาที่ระบุโดยตัวระบุ และเรียกตัวแฮนเดิลการทำงานที่เสร็จสมบูรณ์เมื่อโฆษณาพร้อมแสดง
- หาก
adIdentifier
เป็นตัวระบุใหม่ มุมมองจะแสดงโฆษณาถัดไปที่มีอยู่
- หากใช้
adIdentifier
อยู่แล้ว มุมมองจะแสดงโฆษณาเดียวกันกับที่แสดงในครั้งแรกที่มีการเรียกเมธอดนี้ด้วย adIdentifier
- Parameters
-
view | The GANAdView to populate. |
adIdentifier | An ad identifier used to identify this ad. This can be any NSString. Each unique string will be assigned to the next available ad until ads are exhausted. |
completionHandler | The completion handler to be called when the ad view is ready to be displayed. Ad specific data will provided such as the height of the ad view. |
- (NSString*) publisherID |
|
readnonatomiccopy |
รหัสผู้เผยแพร่โฆษณาที่ใช้สำหรับคำขอโฆษณา
รหัสการตั้งค่าที่ใช้สำหรับคำขอโฆษณา
ตัวเลือกที่ใช้กับคำขอโฆษณาทั้งหมด
ดูว่าสไตล์ที่แสดงล่าสุดเป็นตัวแปรการทดสอบ ตัวควบคุมการทดสอบ หรือไม่ได้รับเลือกสำหรับการทดสอบ
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2023-12-01 UTC
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"ไม่มีข้อมูลที่ฉันต้องการ"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"ซับซ้อนเกินไป/มีหลายขั้นตอนมากเกินไป"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"ล้าสมัย"
},{
"type": "thumb-down",
"id": "translationIssue",
"label":"ปัญหาเกี่ยวกับการแปล"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"ตัวอย่าง/ปัญหาเกี่ยวกับโค้ด"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"อื่นๆ"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"เข้าใจง่าย"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"แก้ปัญหาของฉันได้"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"อื่นๆ"
}]