我是iOS新手,完成了我在故事板中使用SplitView
構建的第二個項目。我在iOS 5中構建了這個,現在在5.1中看到,在縱向視圖中,我的彈出窗口現在是一個滑塊。我閱讀了5.1版的Apple筆記,並決定讓tableview
保持滑塊狀態。我有一組電影,在行選擇時觸發,選中時會全屏顯示。在主視圖可見時,在景觀中,事情可以按預期正常工作。在didSelectRowAtIndexPath
視頻觸發並進入全屏,肖像模式(我的彈出窗口現在是一個滑塊),在didSelectRowAtIndexPath
視頻不會觸發全屏,它實際上在主視圖中播放,我的詳細視圖內容保持在視圖中。我在這裏錯過了什麼?這是我在表視圖代碼(noLandscape是MPMoviePlayerViewController
一個子類:iPad MPMoviePlayerController UISplitView中的iOS 5.1問題
(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
VideoInfo *videoInfo =(VideoInfo*) [listData objectAtIndex:indexPath.row];
NSString *path = [[NSBundle mainBundle] resourcePath];
path = [path stringByAppendingPathComponent:videoInfo.strFileName];
NSURL *movieURL = [NSURL fileURLWithPath:path];
MoviePlayerViewCtrler = [[noLandscape alloc] initWithContentURL:movieURL];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(moviePlayBackDidFinish:)
name:MPMoviePlayerPlaybackDidFinishNotification
object:MoviePlayerViewCtrler];
[MoviePlayerViewCtrler.moviePlayer prepareToPlay];
[self presentMoviePlayerViewControllerAnimated:MoviePlayerViewCtrler];
[MoviePlayerViewCtrler.moviePlayer play];
}
感謝您的幫助