for some reason, in IB, when I make a UILabel, only a few fonts work: Helvetica, Times New Roman, Arial, etc. When I choose a different font, it works when I ty开发者_JS百科pe the text in, but when I press enter, the font changes to Times New Roman. It still says the font is the font I chose in the sidebar, but it is just Times New Roman. Is there some setting I have wrong, or is it just IB not working?
FYI: this is in Xcode 4.0.2.
iOS doesn't support all the fonts that are available on your Mac and visible in Xcode. You can include your own fonts in your app if you want (and if you have an appropriate distribution license for the font), but it's often easier to stick with the available fonts. See this SO question for a link to the list of fonts built into iOS.
You can always use custom fonts you include in your project, and set it at run time.
精彩评论