dismissViewControllerAnimated completion block presenter view and modal view flow

Posted by Patricia LaRue on Stack Overflow See other posts from Stack Overflow or by Patricia LaRue
Published on 2012-11-30T20:55:25Z Indexed on 2012/11/30 23:04 UTC
Read the original article Hit count: 229

Filed under:
|
|

I did find an answer to this title and I did do a little research but I'm still not getting the flow. Here is what I want to happen:

1) click a button on the presenter view to open a modal view. 2) retrieve some value and click a button to close the modal view....sending the value to the presentor view and execute a method.

I get that this works like a callback but I still can't figure out where to put the callback stuff.

So, how exactly do I do this? A) In the presentViewController completion block, should I include the presenter view method to execute when modal view is completed?

Or: B) In the modal view's dismissViewControllerAnimated completion block, should I include the presenter view method to execute when modal view is completed?

Can somebody help me with some sample code? Or at least help me get the flow of which block to put the code in?

Thank you, P

© Stack Overflow or respective owner

Related posts about objective-c

Related posts about xcode