自定义导航栏样式 - iOS [英] Custom nav bar styling - iOS

查看:33
本文介绍了自定义导航栏样式 - iOS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

<块引用>

可能的重复:
.

完全自定义导航栏样式非常困难.我所知道的最好的文章是 Sebastian Celis 的这篇文章:http://sebastiancelis.com/2009/12/21/adding-background-image-uinavigationbar/

这不会覆盖 drawRect,并包含一个很好的解释为什么这是一件好事.另请注意,您不必遵循他的教程.你可以在这里下载完整的代码:https://github.com/scelis/ExampleNavBarBackground

Possible Duplicate:
How to add background image on iphone Navigation bar ?

iOS - How did the NY Times do this custom top navigation bar styling?

And for that matter, the bottom one?

解决方案

EDIT: This is outdated; for iOS5 there's a much better answer below, by @Jenox.

Completely custom styling for Navigation Bars is surprisingly difficult. The best writeup I know of is this one by Sebastian Celis: http://sebastiancelis.com/2009/12/21/adding-background-image-uinavigationbar/

This doesn't override drawRect, and includes a good explanation why that's a good thing. Also note you don't have to follow his tutorial. You can download the complete code here: https://github.com/scelis/ExampleNavBarBackground

这篇关于自定义导航栏样式 - iOS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆