开发者

How to open a navcontroller from a non navcontroller view?

I'm coding an iphone app and I've an issue on how to manage views presentation. Indeed, when 开发者_如何学Gouser starts the app a "home" View shows up containing a search form. When user presses a "search" button I want a method to open a navcontroller that displays the search results. I made another view containing a TableView with the purpose of serving as "results" View. I want the "results" view to allow user to go back to the "home" view (the search form) but I don't want the "home" view to have a navigation controller bar...

Any idea on how to solve this ?

Thx in advance,

Stephane


The easier way is just to hide the navigation bar on the 'home' view and show it back on the other view...


You have to create a UINavigation controller manually and present it modally as follows:

MapViewController *mapViewController = [[[MapViewController alloc] init] autorelease];
UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:mapViewController];

[self presentModalViewController:navController animated:YES];
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜