我正在尝试设置新视图的图像。我设置控制器的图像,然后显示视图。但是在控制器的 viewDidLoad 中,没有可用的图像。
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingImage:(UIImage *)image editingInfo:(NSDictionary *)editingInfo {
EditPictureSaveViewController *editPictureController = [EditPictureSaveViewController alloc];
[editPictureController initWithNibName:@"EditPictureSaveView" bundle:[NSBundle mainBundle]];
UIImageView *imageView = [ [ UIImageView alloc ] initWithImage: image ];
[imageView setImage:image];
[editPictureController setPreview:imageView];
[self.navigationController pushViewController:editPictureController animated:YES];