I have a viewcontroller where I present an UIImagePickerController in a popOver. If the user selects a video, then dismisses the popover and moves on to the next "page (viewcontroller)" and attempts to play any movies using MPMoviePlayerViewController on that page they are unable to do so.
I believe that what is happening is that the player displayed in the imagepicker is somehow being retained and therefore this new video cannot play. I've properly dismissed the popover and do not receive any errors while attempting to play the video.
Has anyone encountered anything like this?
iOS SDK 4.2 iPad.
Did you Tried in Device..?Hope it will work in Device
I may have found the answer for this.
The reason could be luck of releasing UIPopoverController.
When we select a movie on UIImagePickerController, and tap "use" button, the delegated method "imagePickerController:didFinishPickingMediaWithInfo:" would be called.
We may dismiss popover view from inside of this delegated method, but I found that, calling [aPopOver dismissPopoverAnimated] does not lead to calling of "popoverControllerDidDismissPopover:" method.
Then I added [aPopover release] inside "imagePickerController:didFinishPickingMediaWithInfo:", then everything worked fine.
Hope this post will help.
Just been trying to deal with this problem myself with no success until I found this post.
I've gone with [picker popToRootViewControllerAnimated:NO] just incase there isn't a view to pop to. I'm not sure what would happen or if that would occur at all. I've also done away with the animation as I've dismissed the picker at this point so it doesn't matter and multiple animations going on at the same time have caused me problems in the past.
[picker popViewControllerAnimated:YES];