简体   繁体   中英

when i pick image from Photos Library in iPad using UIImagePicker, simulator getting crashed

-(void) pickImage{
 UIImagePickerController *picker = [[UIImagePickerController alloc] init];
  picker.sourceType = UIImagePickerControllerSourceTypeSavedPhotosAlbum;
  picker.delegate = self;
   [self presentModalViewController:picker animated:YES];

}


- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingImage:(UIImage *)image editingInfo:(NSDictionary *)editingInfo{
   UIImage *myImage =image;
}

when pickImage meth called simulator crashing and showing message in terminal as below:

2012-09-08 18:53:50.953 NewExample[4645:207] UIStatusBarStyleBlackTranslucent is not available on this device.

any idea? Thanks in Advance.

Just check these links.

Crash iPad Photo Picker

"UIStatusBarStyleBlackTranslucent is not available on this device. Ignoring UIStatusBarStyle key in Info.plist." - What to do?

iPad translucent status bar?

iPad doensn't support the UIStatusBarStyleBlackTranslucent . Thats why you're getting crashed.

Check this link How to use UIImagePickerController in iPad? in ipad image picker should be presented using uipopover controller.

My understanding is that you could not present image picker from the simulator. Validate whether the camera is available for the device and present image picker view.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM