我正在编写一个应用程序,该应用程序假设从库或相机中获取图像并用它做一些事情。我已经设法加载图片:
UIImagePickerController *picker =[[UIImagePickerController alloc] init];
picker.delegate = self;
if ([@"cam" isEqual:[[sender titleLabel] text]]) {
picker.sourceType = UIImagePickerControllerSourceTypeCamera;
} else if ([@"album" isEqual:[[sender titleLabel] text]]) {
picker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
}
[self presentModalViewController:picker animated:YES];
工作正常。but what i am trying to do is when a picture is chosen, i want to go to a new view. 我有changeView
进入指定视图的方法,但是当我从它调用它时
-(void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
由于某种原因它不起作用。
程序进入segue
课堂,但没有任何反应。