Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当 iphone 处于横向模式或纵向模式时,如何自动更改 ADBannerView 的大小。
iAd 以横向模式出现,但不以纵向模式出现。
你必须使用 CGRectMake 方法。
代码前:
UIDeviceOrientation orientation = [[UIDevice currentDevice] orientation]; if (orientation == UIDeviceOrientation Portrait) { banner.frame = CGRectMake (0,0,768,70) } else { banner.frame = CGRectMake (0,0,1024,70) }