使用popvivew控制器时,如何将Uiimage从一个视图控制器传递到另一个视图控制器? [英] How to Passing Uiimage from one view controller to Other view controller when using popvivew controller used?
问题描述
我有两个View控制器。
I Have Two View controllers.
-
第一个UIViewController包含一个UIImage,当我单击 crop按钮时,转到第二个视图控制器我通过推式视图控制器传递图像,这里是裁剪UIImage。
First UIViewController contain one UIImage, when I click "crop" button, go to second view controller I pass the image by push view controller, here I'am cropping my UIImage.
在第二个UIViewController中,裁剪图像后,单击完成按钮,我需要将裁剪的图像传递到第一视图。
In second UIViewController after cropping my image, clicking "done" button, I need to pass the cropped image to first view.
问题是当我使用弹出视图控制器时,图像没有通过。
Problem is when I use pop-view controller, image is not passing.
推荐答案
尝试这样。第一视图控制器应具有属性
Try like this. First view controller should have a property
@property (assign)UIImage *croppedImage;
第二个视图控制器应具有
Second view controller should have
@property (assign)FirstViewController *first;
弹出集之前
first.croppedImage = self.image;
这篇关于使用popvivew控制器时,如何将Uiimage从一个视图控制器传递到另一个视图控制器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!