开发者

iPhone changing the rootviewcontroller dynamically?

开发者 https://www.devze.com 2023-03-19 03:04 出处:网络
I will use UINAvigationController in my app, but noticed that my rootview should be either a tableview or a uiview depending on content I recei开发者_C百科ved. as you know It comes with a tableview by

I will use UINAvigationController in my app, but noticed that my rootview should be either a tableview or a uiview depending on content I recei开发者_C百科ved. as you know It comes with a tableview by default. how can I push my first view dynmacally here ?


U can do like this in application:didFinishLaunchingWith.... in app delegate. For this, u need to create the application with window based application template.

DetailViewController *detailView = [[DetailViewController alloc] initWithNibnam..];
UINavigationController *uiNavController = [[UINavigationController alloc] initWithRootViewController:detailView];
self.window.rootViewController = uiNavController;
[detailView release]; 
[uiNavController release];
0

精彩评论

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