相关疑难解决方法(0)

UIStatusBarStyleBlackTranslucent在此设备上不可用

我有一个UIActionSheetiPad有三个选项:

  1. 取消
  2. 相机
  3. 图片库

当我触摸"照片库"选项时,我收到了崩溃和消息

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];

cocoa-touch ipad ios uistatusbar ios5

5
推荐指数
2
解决办法
5249
查看次数

标签 统计

cocoa-touch ×1

ios ×1

ios5 ×1

ipad ×1

uistatusbar ×1