简体   繁体   中英

ios:dismiss and push view controller performing at a time

I have 3 view controllers in my current app.

  • The first view controller has a stream of data.
  • In the second view controller , an image can be selected.
  • In the third view controller , the selected image is edited and the edited image will be shared in the stream of the first view controller .

Problem

In the second view controller, I have a UIImagePickerController for picking the image and the image goes for editing by pushing the third view controller. I then need to dismiss the view controller after editing the image and also need to push the image to the stream view controller (first view controller). How should I do this? Thanks for the help!

From what I can tell, you want to pass an image from the 3rd view controller to the 1st view controller.

You could use NSNotifications to do this.

But you may want to consider a separating the publishing to a stream from the first view controller, and put it in its own (singleton) publishing service.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM