首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >IOS8.3中的UIAlertviewController崩溃

IOS8.3中的UIAlertviewController崩溃
EN

Stack Overflow用户
提问于 2015-04-18 10:27:43
回答 1查看 811关注 0票数 3

我使用的是UIAlertView,但在IOS8.3中,我更改为UIAlertViewController,因为UIAlertview不工作,但UIAlertViewController与错误崩溃

代码语言:javascript
复制
'UIApplicationInvalidInterfaceOrientation',
reason: 'Supported orientations has no common orientation with 
         the application, and 
         [ChartsTableViewController2_iPhone shouldAutorotate] is returning YES'

不知道该怎么办请帮帮我。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2015-04-18 10:58:01

尝试将UIAlertController子类并添加此代码。希望能帮上忙。

代码语言:javascript
复制
- (NSUInteger)supportedInterfaceOrientations {
    return UIInterfaceOrientationMaskAll;
}

- (BOOL) shouldAutorotate {
    return YES;
}

- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation {
    return UIInterfaceOrientationPortrait;
}
票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/29716011

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档