Ios7 当我在加载或打开时触发actionsheet时,ios崩溃将出现
在视图上触发操作表确实在ios 6中起作用,但在ios 7中它现在崩溃了。将其移动到ViewWillAppeal没有帮助。在视图出现后,通过单击按钮触发操作表可以正常工作。为什么它现在不能在ios 7中工作 现在加载视图时,建议采用什么方式自动触发操作表Ios7 当我在加载或打开时触发actionsheet时,ios崩溃将出现,ios7,Ios7,在视图上触发操作表确实在ios 6中起作用,但在ios 7中它现在崩溃了。将其移动到ViewWillAppeal没有帮助。在视图出现后,通过单击按钮触发操作表可以正常工作。为什么它现在不能在ios 7中工作 现在加载视图时,建议采用什么方式自动触发操作表 UIActionSheet *actionSheet; NSString* title = @"update your public profile picture"; if (![UIImagePickerControl
UIActionSheet *actionSheet;
NSString* title = @"update your public profile picture";
if (![UIImagePickerController isSourceTypeAvailable: UIImagePickerControllerSourceTypeCamera]) {
actionSheet = [[UIActionSheet alloc] initWithTitle:title delegate:self cancelButtonTitle:@"Cancel" destructiveButtonTitle:nil otherButtonTitles: @"Choose Existing Photo", nil];
}
else {
actionSheet = [[UIActionSheet alloc] initWithTitle:title delegate:self cancelButtonTitle:@"Cancel" destructiveButtonTitle:nil otherButtonTitles:@"Take Photo", @"Choose Existing Photo", nil];
}
[actionSheet showFromRect:CGRectMake(0, 0, [[UIScreen mainScreen]bounds].size.width, [[UIScreen mainScreen]bounds].size.height) inView:self.view animated:YES];
崩溃时的错误消息是什么?SIGABORT,当我查看crashalytics日志时,我看到无法显示工作表,因为视图不在窗口中: