UIActionSheet未在iOS 8中显示 [英] UIActionSheet not showing in iOS 8
本文介绍了UIActionSheet未在iOS 8中显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我可以在iOS 7中显示actionSheet,但无法在iOS 8环境中显示。有没有办法追踪?
I can show the actionSheet in iOS 7 but cannot show in iOS 8 environment. Is there any way to trace?
UIActionSheet *_actionSheet = [[UIActionSheet alloc] initWithTitle:@"Account"
delegate:self
cancelButtonTitle:@"Close"
destructiveButtonTitle:@"Log Out"
otherButtonTitles:@"View Account", nil];
[_actionSheet showInView:appDel.window];
推荐答案
UIActionSheet在iOS 8中已弃用。
UIActionSheet is deprecated in iOS 8.
要在iOS 8中创建和管理操作表,您应该使用UIAlertController和UIAlertControllerStyleActionSheet的preferredStyle。
To create and manage action sheets in iOS 8 you should use UIAlertController with a preferredStyle of UIAlertControllerStyleActionSheet.
请参阅示例。
这篇关于UIActionSheet未在iOS 8中显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文