简体   繁体   English

iPhone应用程序上的iPad风格导航栏

[英]iPad style navbar on iPhone app

Hey, on iPad the navigation bar is normally silver and on the iPhone it's normally blue. 嘿,在iPad上,导航栏通常为银色,在iPhone上,导航栏通常为蓝色。 Is there any easy way to make the silver navbar on iPhone app? 有没有简单的方法可以在iPhone应用程序上制作银色导航栏?

Thanks!! 谢谢!!

If you just want to change the color of your navigation bar, the easiest way to do this would be to add your navigation bar in IB, then click on the navigation bar's attributes panel. 如果只想更改导航栏的颜色,最简单的方法是在IB中添加导航栏,然后单击导航栏的属性面板。 Change the tint color to whatever color you would like in there and it will show up accordingly on your app. 将颜色更改为您想要的颜色,它将相应地显示在您的应用中。 Similarly, if you are adding the navigation bar programmatically, you should be able to set the tint color yourself with something along the lines of myNavBar.tintColor = [UIColor someColor]; 类似地,如果您以编程方式添加导航栏,则应该能够自己使用myNavBar.tintColor = [UIColor someColor];设置颜色myNavBar.tintColor = [UIColor someColor]; . I hope this helps. 我希望这有帮助。

应该可以帮助您自定义导航栏。

As of iOS 5 this can be easily achieved without any manual tinkering. 从iOS 5开始,无需任何手动修补即可轻松实现。 Read this up. 阅读这个了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM