How to add a nav bar at the bottom of a view programmatically?
I have a view with a nav bar on top (I downloade开发者_运维技巧d this app and its a nav controller app) but how to add a nav bar on bottom?
//
modified
UINavigationBar *bottomBar=[[UINavigationBar alloc]initWithFrame:CGRectMake(0, 436, 320, 44)];
[self.view setFrame:CGRectMake(0, 0, 320, 460-44)];
[self.view addSubview:bottomBar];
I am pretty sure that the UINavigationController actually supports this out of the box. It's called a UIToolbar, I believe and if you look in the documentation, you'll be able to find more on that.
You can able to use the UItoolbar instead of navigation bar
UIToolbar *toolbar = [[UIToolbar alloc] initWith:CGRectMake(0, 436, 320, 44)];
[myview addSubview:toobar];
精彩评论