0

別の UIViewController からモーダルな方法で UINavigationController の rootview を提示しようとしています。ただし、モーダル遷移をトリガーするボタンをクリックすると、空の UINavBar を含む空白の画面が表示されます。ビューを UINavigationController にアタッチしていないと思われますが、これを行う方法が正確にはわかりません。

これは、モーダル遷移をトリガーすることになっている target-action メソッドのコードです。このコードは、モーダル プレゼンターの実装ファイルに含まれています。

    //Instansiate the root UIViewController 

        OzSoundSelectionViewController *selectionView = [[OzSoundSelectionViewController alloc]initWithNibName:@"OzSoundSelectionViewController" bundle:nil];

//Instansiate the UINavigatonController and set the root view controller

        navigationController = [[UINavigationController alloc]initWithRootViewController:selectionView];

//Set up the modal transition
        [selectionView setModalTransitionStyle:UIModalTransitionStyleFlipHorizontal];
        [self presentModalViewController:navigationController animated:YES];
4

1 に答える 1