我是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];
}
感谢您的帮助