Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
368 views
in Technique[技术] by (71.8m points)

uinavigationbar - Change iPhone navigation bar's height

My client can't read iPhone's default fonts, the size is too small. I have an application with a navigation bar and I need to make everything in it bigger, for example, the font's size.

IB doesn't seem to allow this... any help?

Many thanks!

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Update: today (2012) there is a much bigger tendency towards custom UIs, so I would say the answer below is way too harsh. There is still no supported way of customizing height, though, but you can certainly derive from UINavigationBar and override some sizing methods. This probably will not get you rejected (although it is still a grey area, just something Apple will probably overlook today).

Once you get the size you want, you can use iOS 5 customization APIs to add the custom background image (see WWDC 2011 Session 114 - Customizing the Appearance of UIKit Controls).

Original answer from 2009:

This is generally impossible.

What's more, I believe making the navigation bar taller is a violation of Apple Human Interface Guidelines, and your application may be rejected from the App Store because of it. Please make sure your client understands this risk before proceeding.

(Pointing out rejection risks is usually a good way to convince clients against making nonsense decisions.)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...