开发者

Font not appearing in UILabel

I have a UILabel that I've placed in IB. In the inspector I have 开发者_Python百科changed the font to "Papyrus". When I launch the app in the simulator, the font is not Papyrus. How can I change the font?


You can add custom fonts but you need to add them into your .plist file under the key "Fonts provided by application" to a new row.

Fonts must be added to the Resources of the project and TTF and OpenType fonts are supported.

I believe this is only available in iOS 3.2 or later.

Thanks


Not all fonts listed in IB are available on the iPhone as standard. Papyrus is one of those not available on the iPhone.

More here:

http://ajnaware.wordpress.com/2008/10/24/list-of-fonts-available-on-the-iphone/

You can add custom fonts to the iPhone, but I'd think hard before doing that -- if you're putting a weird looking font onto normal UI items, ask yourself if it actually looks any good! I've seen some real eyesore apps where someone thought it would be cute to put some crime against typography on all the UI controls.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜