uitableviewcontrollerサブクラスから一部のビューコントローラをプッシュしようとすると、異常なアプリケーションの動作が発生します。UINavigationController pushViewController from tableViewControllerサブクラス
まず説明します。私はnavigationControllerの中にあるrootViewController(appDelegate)にリンクされているメイン・ペンを作成しました。
私は何を取得怒鳴るのコードを実行しようとすると:それはスクリーンショットに示されているようにそのペン先AでUITableView
およびカスタムUITableViewController
サブクラスNews_TableViewController
を追加した
My_WebView *webView = [[My_WebView alloc] initWithNibName:@"My_WebView" bundle:nil];
[self.navigationController pushViewController:webView animated:YES];
を次に私はself.navigationControllerオブジェクトをチェックしましたが、NULLを返します:
NSLog(@"OBJ: %@",self.navigationController);
私はどうですか?私のカスタムクラスにもかかわらずnavigationController
への参照を取得して実際にnavigationControllerの下に住んでいる?あなたが言及してきたように
おかげ
tableViewControllerのどのメソッドでwebViewをプッシュしていますか? – Akshay
私はviewForFooterInSectionメソッドでこれを使用しました。しかし、他の場所では動作しません。 NSLog(@ "%@"、self.navigationController)は常にNULLを返します。 –
まず、TableViewControllerサブクラスのviewDidLoadメソッドにブレークポイントまたはNSLogを配置する必要があります。それはヒットですか? – Akshay