嗨,我只有风景应用程序。我正在向其中添加 iAd,然后单击测试添加我的应用程序崩溃并出现此错误
*** Terminating app due to uncaught exception 'UIApplicationInvalidInterfaceOrientation', reason: 'Supported orientations has no common orientation with the application, and shouldAutorotate is returning YES'
在我的应用程序委托中,我有
_bannerView.requiredContentSizeIdentifiers = [NSSet setWithObjects: ADBannerContentSizeIdentifierLandscape, nil];
在我的 VC 中,我再次设置
[_bannerView setCurrentContentSizeIdentifier:ADBannerContentSizeIdentifierLandscape];
只保留我的应用程序 Landspace
-(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
// Return YES for supported orientations
return (interfaceOrientation == UIInterfaceOrientationLandscapeRight);
}
请提出这里有什么问题。