iAd for Landscape only应用程序抛出错误

时间:2012-08-03 21:30:50

标签: objective-c ios orientation iad

嗨,我有我的风景专用应用。我正在添加iAd,我点击测试添加我的应用程序崩溃此错误

*** Terminating app due to uncaught exception 'UIApplicationInvalidInterfaceOrientation', reason: 'Supported orientations has no common orientation with the application, and shouldAutorotate is returning YES'

在我的app委托中我有

_bannerView.requiredContentSizeIdentifiers = [NSSet setWithObjects: ADBannerContentSizeIdentifierLandscape, nil];

在我的VC中我再次设置

[_bannerView setCurrentContentSizeIdentifier:ADBannerContentSizeIdentifierLandscape];

只保留我的应用Landspace

-(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
    // Return YES for supported orientations
    return (interfaceOrientation == UIInterfaceOrientationLandscapeRight);
}

请在此提出建议。

1 个答案:

答案 0 :(得分:1)

通过使用最新的SDK更改更新我的代码来修复

相关问题