Turning numbers into uppercase numbers with NSAttributedString/NSString and UILabel

巧了我就是萌 提交于 2019-12-12 00:19:40

问题


I'm using a font here that has different looks for uppercase and lowercase numbers. This works perfectly in text editors, and Adobe's tools (by settings labels to uppercase only), and I figured this would work in UIKit as well by just running the string through the uppercaseString method, but it doesn't seem to actually turn the numbers into their uppercase versions.

So… How can I turn numbers into uppercase in UIKit? Can I?


回答1:


This blog post may help.

Also note that while there are quite a few different terms for these, in the world of typography they are more typically known as lining and old-style figures, not "uppercase and lowercase numbers"



来源:https://stackoverflow.com/questions/15663661/turning-numbers-into-uppercase-numbers-with-nsattributedstring-nsstring-and-uila

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