我正在尝试将 prepareForSegue 与使用 UIImagePickerController 从相机胶卷或相机拍摄的图像一起使用。这就是我现在所拥有的,我不知道如何完成它,我希望你能帮助我
视图控制器.h
@interface ViewController : UIViewController
<UIImagePickerControllerDelegate, UINavigationControllerDelegate>
-(IBAction)escoger:(id)sender;
-(IBAction)camara:(id)sender;
@property(strong,nonatomic) UIImagePickerController *imagepicker;
@property(strong,nonatomic)IBOutlet UIImageView *image;
视图控制器.m
-(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender{
if ([segue.identifier isEqualToString:@"escoger"]) {
//UIImagePickerController *intro = [UIImagePickerController ]
imagepicker = [[UIImagePickerController alloc]init];
imagepicker.delegate = self;
imagepicker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
[self presentViewController:imagepicker animated:YES completion:nil];
}}