开发者

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];
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜