Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

mathieuhendey

macrumors newbie
Original poster
Dec 27, 2011
8
0
Am I okay to just call [self dismissModalViewControllerAnimated:YES] from the modal view controller or do I have to do it from the parent controller? It works from the modal view, but I've seen some sources state that delegating to the parent is better. Is my app going to get rejected if I don't delegate?
 
Am I okay to just call [self dismissModalViewControllerAnimated:YES] from the modal view controller or do I have to do it from the parent controller? It works from the modal view, but I've seen some sources state that delegating to the parent is better. Is my app going to get rejected if I don't delegate?

The object that was responsible for presenting your modal controller should be the same object responsible for dismissing your modal controller. It will be a cleaner approach. It will help abstract the design of your view controller.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.