2
- (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 上却不能工作 错误?还是我错了?

4

0 回答 0