When a modal UIViewController is dismissed, Apple recommends to use the delegate pattern to pass data back to the presenting UIViewController. I am using that and it works just fine. But I was wondering if the same (passing data back) can be achieved using the completion block. Right now, I just set it to nil when showing and dismissing the modalVC:
[self presentViewController: modalVC animated: YES completion: nil]; and [[self presentingViewController] dismissViewControllerAnimated: YES completion: nil]; But even though it is often set to nil, that completion argument isn't there for no reason. So, can it be used to pass values of settings back and forward between the presentingVC and the modalVC? Or is that a misuse of the completion block? And if so, what would be a use of the completion block when presenting and dismissing view controllers? Thanks, - Koen. _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com