What does the iAd `UIViewController` category `canDisplayBannerAds` do?

前端 未结 2 1117
情书的邮戳
情书的邮戳 2020-12-21 05:57

In iOS7, the iAds framework includes the category -[UIViewController canDisplayBannerAds].

What does this category do and how should I use it?

2条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-21 06:41

    You actually need to look at the docs for originalContentView to learn this:

    When a view controller enables banner ads, the system puts the view controller’s content view inside of a new content view that the system manages. This allows the system to dynamically resize the original content view when a banner ad is displayed, as well as managing the display of the banner ad itself. This property provides access to the original content view, rather than the containing view that manages banner ad display.

提交回复
热议问题