I have an iAd in an iPad app. When the user rotates, I use setFrame to tell the ad's view to resize and move to the bottom of the screen. Unfortunately, although I am setting the width to 1024, iOS is not complying and the iAd's switch is rema开发者_高级运维ining at 768.
How to fix this?
Thanks.
To resize the banner view you must use the currentContentSizeIdentifier property.  The documentation:
Your application should never directly change the size of the banner view. Instead, set the currentContentSizeIdentifier property to a known advertising size. The view is automatically resized to match the new content size.
So to resize the banner view for landscape, you would do the following:
bannerView.currentContentSizeIdentifier = ADBannerContentSizeIdentifierLandscape;
If you need to know the actual size this will change the banner view's frame to, use the ADBannerView class method sizeFromBannerContentSizeIdentifier:.  So if you resize the banner view for landscape, then the new size will be
CGSize bannerViewSize = [ADBannerView sizeFromBannerContentSizeIdentifier:ADBannerContentSizeIdentifierLandscape];
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论