我有一个UIActionSheet
iPad 版,它有三个选项:
- 取消
- 相机
- 照片库
当我触摸“照片库”选项时,我得到一个崩溃和一条消息
UIStatusBarStyleBlackTranslucent 在此设备上不可用。
我读了这篇文章,但没有弄清楚。
有人能帮我吗?
更新:
-(void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex {
if (buttonIndex == 0)
{
imgController = [[UIImagePickerController alloc] init];
imgController.allowsEditing = YES;
imgController.sourceType = UIImagePickerControllerSourceTypeCamera;
imgController.delegate=self;
[self presentModalViewController:imgController animated:YES];
}
else if (buttonIndex == 1)
{
imgController = [[UIImagePickerController alloc] init];
imgController.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
imgController.delegate=self;
[self presentModalViewController:imgController animated:YES];
}
}
我在最后一行崩溃了,即[self presentModalViewController:imgController animated:YES];