- (IBAction) buttonAction:(id) sender {
if (self.picker == nil) {
self.picker = [[UIImagePickerController alloc] init];
self.picker.delegate = self;
self.picker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
self.picker.allowsEditing = NO; } [self.navigationController presentModalViewController:_picker
animated:YES];
}
(void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info {
[self dismissModalViewControllerAnimated:YES];
UIImage *myImage = (UIImage *) [info
objectForKey:UIImagePickerControllerOriginalImage];
if (myImage == nil) NSLog(@"Image nil");
}
它在iPhone设备上运行良好,但在iPhone 2x模式下无法在iPad上运行 错误? 或者我错了?