我可以在 iOS 7 中显示 actionSheet,但不能在 iOS 8 环境中显示。有什么办法可以追溯吗?
UIActionSheet *_actionSheet = [[UIActionSheet alloc] initWithTitle:@"Account"
delegate:self
cancelButtonTitle:@"Close"
destructiveButtonTitle:@"Log Out"
otherButtonTitles:@"View Account", nil];
[_actionSheet showInView:appDel.window];
最佳答案
UIActionSheet 在 iOS 8 中被弃用。
要在 iOS 8 中创建和管理操作表,您应该使用 UIAlertController 和 preferredStyle 的 UIAlertControllerStyleActionSheet。
引用这个example .
关于ios - UIActionSheet 未在 iOS 8 中显示,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26061964/