【发布时间】:2016-03-11 05:52:46
【问题描述】:
使用此代码打开操作表。 在 iPhone 上完美运行,但在 iPad 上崩溃。我认为这是因为arm64。可能我必须将 Actionsheet 转换为弹出框。
如何更改此代码?
- (void)pushedNewBtn
{
UIActionSheet *sheet = [[UIActionSheet alloc] initWithTitle:nil delegate:self cancelButtonTitle:@"Cancel" destructiveButtonTitle:nil otherButtonTitles:@"Camera", @"Photo Library", nil];
[sheet showInView:self.view.window];
}
【问题讨论】:
-
UIActionSheet已弃用。除非您需要支持 iOS 7,否则您应该使用UIAlertController。 -
顺便说一句 - 当您发布有关崩溃的问题时,您需要在问题中包含有关崩溃的详细信息。请使用这些详细信息更新您的问题。
标签: ios popover uiactionsheet