-1
如何顯示圖像從UIImagePickerController到另一個ViewController.xib?UIImagePickerController到另一個ViewController
我有「ViewController1」,在這裏我得到這個代碼:
- (IBAction)goCamera:(id)sender {
UIImagePickerController * picker = [[UIImagePickerController alloc] init];
picker.delegate = self;
[picker setSourceType:UIImagePickerControllerSourceTypeCamera];
[self presentModalViewController:picker animated:YES];
}
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info {
[picker dismissModalViewControllerAnimated:YES];
UIImageView *theimageView = [[UIImageView alloc]init];
theimageView.image = [info objectForKey:@"UIImagePickerControllerOriginalImage"];
}
我怎麼能去「ViewController2」,並顯示出拍攝的照片呢?我使用ViewController1拍攝一張照片,並且我想在ViewController2中顯示這張拍攝的照片,我在那裏獲得了一個UIImageView。非常感謝