我有關於MPMoviePlayer的問題。我正在使用[self presentModalViewController:moviePlayer animated:YES];
來顯示播放器。當我點擊完成按鈕MPMoviePlayer無法正常工作
(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];
}
方法調用。當它導航到前一個視圖時,先前視圖的x和y座標受到干擾,所有內容都會更改,這意味着視圖會發生變化。有什麼建議麼 ?使用方法presentMoviePlayerViewControllerAnimated:和dismisMoviePlayerViewControllerAnimated:而不是使用presentModalViewController:animated:
/dismissModalViewControllerAnimated:
這是什麼原因:[[UIApplication sharedApplication] setStatusBarHidden:YES];你爲什麼試圖隱藏狀態欄? – Hanuman 2011-04-05 07:48:54
謝謝哈努曼......它解決了! – Maulik 2011-04-05 08:21:16
但仍然是一件事..當我第一次開始視頻時,完成按鈕消失,第二次出現!任何解決方案 – Maulik 2011-04-05 08:25:04