iPhone上有字体选择器吗?

iXc*_*der 5 iphone

作为主题,我很奇怪,为什么SDK不提供API来显示UIFont选择器?喜欢日期选择器......

或者现在可以使用一些开源代码?

谢谢你的帮助 !

问候

Ale*_*pty 9

我在几分钟内掀起了一些可能是你想要的东西:http://github.com/alexrepty/ARFontChooser


Vla*_*mir 6

我不知道现有的解决方案,但您可以轻松检索系统中可用的所有字体名称:

for (NSString* familyName in [UIFont familyNames])
     for (NSString* fontName in [UIFont fontNamesForFamilyName:familyName])
         // Store font names or do whatever you want
         // You can create font object using 
         // [UIFont fontWithName:fontName size:fontSize];
Run Code Online (Sandbox Code Playgroud)

然后允许用户使用您想要的设计在您自己的字体选择器中选择其中一个.