UIAlertView和UIActionSheet在iOS 8中无法正常显示 [英] UIAlertView and UIActionSheet not displaying properly in iOS 8

查看:114
本文介绍了UIAlertView和UIActionSheet在iOS 8中无法正常显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

UIAlertView UIActionSheet 在iOS 8中无法正常显示,它隐藏了视图控制器,也在警报视图标题中没有显示。我从Xcode 5.1.1运行应用程序。

UIAlertView and UIActionSheet not displaying properly in iOS 8, its hiding the view controller, also In alert view title is not displaying. I am running the app from Xcode 5.1.1.

推荐答案

您是否在应用程序中添加了ViewController的任何类别。如下所示

Did you added any category for ViewController in your application. like below shown

@implementation UIViewController (CustomeAction)
- (void)setTitle:(NSString *)title{
// YOU CODE///
}
@end

这可能是个问题。我通过删除此类别解决了 - (void)setTitle:(NSString *)title。

This may the issue. I have solved by removing this category - (void)setTitle:(NSString *)title.

注意:来自iOS 8,UIAlertViewController继承自UIViewController。如果你使用类别方法,它将对UIAlertView& UIActionSheet标题。

Note: From iOS 8, UIAlertViewController is inherited from UIViewController. If you use category method, it will be effect on UIAlertView & UIActionSheet titles.

您可以参考 UIAlertController类参考

这篇关于UIAlertView和UIActionSheet在iOS 8中无法正常显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆