开发者

How to Push A view with TabBarController as Root

I'm starting out with iOS Development.

Currently, I've implemented a TabBarController that nests 2 Views, one of which has a TableView within in.

I'm trying to get the table view to Push another view when DidSelectRow is called.

What I am trying to do is similar to the AppStore in the Search Tab. I.E: When you find the App you want you tap on the table row - then the search bar fades away and the Navigation bar fades in, revealing more detail.

Right now I'm trying this:

self.nav = [[UINavigationController alloc] initWithRootViewCo开发者_运维问答ntroller:rootVC];
nav.delegate = self;    
self.detailView = [[detailView alloc] initWithNibName:@"detailView" bundle:nil];

[nav pushViewController:self.detailView animated:YES];

Where rootVC is the viewController in my secondView.

This does nothing. I've called NSLog to make sure that the method is being called, and it is.

Any help is greatly appreciated.

Thanks!


Do you have a navigation controller in the app? One way to achieve the navigation controller with tab bar controller is to add navigation controller for each tab bar item . Then make the root view controller of the navigation controller one of your 2 views controllers.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜