开发者

MPMoviePlayer not working properly

I have a problem regarding to MPMoviePlayer. I am using [self presentModalViewController:moviePlayer animated:YES]; to display player. When I click on Done button

(void) moviePlayBackDidFinish:(NSNotification*)notification 
{    
  [[UIApplication sharedApplication] setStatusBarHidden:YES];

    // Remove observer
  [[NSNotificationCenter defaultCenter] removeObserver:self
                            name:MPMoviePlayerPlaybackDidFinishNotification 
                            object:nil];

    //[self.navigationController popToViewController:[self.navigationController.viewControllers objectAtIndex:1] animated:YES];
    [self dismissModalViewControllerAnimated:YES];  
开发者_运维知识库    //[self.view removeFromSuperview];

}

method calls. When it navigates to previous view, previous view's x and y ordinates get disturbed and everything is changed, means, the view gets changed. Any suggestions ?


Try using the methods presentMoviePlayerViewControllerAnimated: and dismisMoviePlayerViewControllerAnimated: instead of using presentModalViewController:animated: / dismissModalViewControllerAnimated:


Solved the problem by removing [[UIApplication sharedApplication] setStatusBarHidden:YES]; code.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜