更改iPhone导航栏的高度 [英] Change iPhone navigation bar's height

查看:130
本文介绍了更改iPhone导航栏的高度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的客户端无法读取iPhone的默认字体,尺寸太小。我有一个带导航栏的应用程序,我需要将其中的所有内容放大,例如,字体的大小。



IB似乎不允许这样做..任何帮助?



非常感谢!

解决方案

更新:今天(2012)自定义用户界面有一个更大的趋势,所以我想说下面的答案过于苛刻。但是,仍然没有支持的自定义高度的方法,但是你当然可以从UINavigationBar派生并覆盖一些大小调整方法。这可能会让你被拒绝(尽管它仍然是一个灰色区域,只是Apple今天可能会忽略的东西)。



一旦你得到您想要的大小,您可以使用iOS 5自定义API添加自定义背景图像(请参阅WWDC 2011会话114 - 自定义UIKit控件的外观)。



2009年的原始答案:


这通常是不可能的。



<更重要的是,我认为使导航栏更高是违反
的Apple人机界面指南,并且您的应用程序可能因为它而被拒绝从App Store中扣款。请确保您的
客户在继续操作之前了解此风险。



(指出拒绝风险通常是说服
客户反对制造废话的好方法决定。)



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!

解决方案

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.)

这篇关于更改iPhone导航栏的高度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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