UIFont possible sizes

China☆狼群 提交于 2019-12-12 05:31:30

问题


I am trying in an iPhone app to set the possibility for the user to choose the fonts.

I have already made progress using the UIFont class. Here is my question : When the choice of a Font within a Font Family is made how to I know the possibilities the user has for the size? Is there a way to list them? I did not see anything like that in the UIFont documentation or anywhere I looked on the net.

Thanks for any piece of information.


回答1:


iOS uses scalable fonts, and you can specify the size in fractions of points. So there's no way to list the possibilities. Give the user a few good choices or a slider.




回答2:


Like David Dunham said, fonts are scalable, so you can use the [UIFont normalSystemFondOfSize:] method to access a font with any size. You can also use [UIFont fontWithName:size:] if you need to actually change the font used.



来源:https://stackoverflow.com/questions/8235852/uifont-possible-sizes

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!