在我支持所有设备方向的 iPad 应用程序中,我将 adBannerView 添加到主视图。
到目前为止一切顺利。它有效并且广告按预期轮播。
如果我点击一个特定的广告,它会全屏显示,当我关闭它时,我会返回到我的应用。
问题是,如果您在查看全屏广告时旋转设备,它会正确旋转,但当您关闭它并返回应用时, View 不会旋转。
如何解决?请帮忙,否则我会毁了我的 iPad! ;-)
最佳答案
基本上,你想要
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
要再次调用的方法...
为此,当用户关闭 iAd 时,只需执行:
UIViewController *correctOrientation = [[UIViewController alloc]init];
[self presentModalViewController:correctOrientation animated:NO];
[self dismissModalViewControllerAnimated:NO];
关于ios - iAD - adBannerView 旋转,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10954089/