2012-03-21 2 views
0

私はiOSを初めて使い、storyboardsにSplitViewで構築した2番目のプロジェクトを終了しました。私はこれをiOS 5で作成しました。そして、5.1で、ポートレートビューで私のポップオーバーはスライダーになっていることがわかりました。私はAppleノートで5.1を読んで、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]; 

} 

あなたのdetailviewcontrollerなくmasterviewcontrollerでムービーを再生する必要があなたの助け

答えて

0

をありがとうだからあなたにdetailviewcontrollerは、masterviewcontrollerでどの行が選択されているのかを伝える必要があります。次に、詳細ビューで適切なムービーをロードして、モーダル表示をポップアップしてムービーを表示します。

関連する問題