我有一个UIActionSheetiPad有三个选项:
当我触摸"照片库"选项时,我收到了崩溃和消息
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];
}
}
Run Code Online (Sandbox Code Playgroud)
我在最后一行崩溃了 [self presentModalViewController:imgController animated:YES];