开发者

Is there a font picker on iPhone?

开发者 https://www.devze.com 2022-12-23 02:28 出处:网络
as topic, I am strange that why does the SDK not provide API to show the UIFont picker ? like the date Picker......

as topic, I am strange that why does the SDK not provide API to show the UIFont picker ? like the date Picker......

or maybe some open source code is开发者_Go百科 available now ?

Thanks for your help !

Regards


I whipped something up in a few minutes which might be what you want: http://github.com/alexrepty/ARFontChooser


I am not aware of existing solutions but you can easily retrieve all font names available in system:

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];

And then allow user to pick one of then in your own font picker with the design you want.

0

精彩评论

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