There is an application which uses several view controllers. In one of them there is a button which switches to a new view, and there, in viewDidLoad method, I launch a video playback. But when it’s stopped, an empty view pops up instead of the previous view I’m working with.
What is a proper way to switch back to the previous view automatically? I’ve read about MPMoviePlayerPlaybackDidFinishNotification so I can use it.
It’s a navigation-based application.
When you get the MPMoviePlayerPlaybackDidFinishNotification you just pop the current view controller with the popViewController… messages:
the navigationController property contains the active navigation controller.
see Apple docs for UINavigationController