开发者

Displaying text on a UILabel in digital form?

开发者 https://www.devze.com 2023-01-04 17:36 出处:网络
Ho开发者_开发技巧w can we display text in digital format(seven segment display) on a UILabel similar to the way as text is displayed in Digital Clock.For simple you can also use Apple recommended font

Ho开发者_开发技巧w can we display text in digital format(seven segment display) on a UILabel similar to the way as text is displayed in Digital Clock.


For simple you can also use Apple recommended font.

label.font=[UIFont fontWithName:@"DBLCDTempBlack" size:60.0];

Please Check this to find all the font supported by iPhone.


Simple approach: use a custom font.

Here's a UILabel subclass that allows you to embed custom fonts in your application: http://github.com/zynga/FontLabel

Here are a whole bunch of fonts that look like digital clocks: http://www.dafont.com/theme.php?cat=302 (be sure to read the licensing information for whatever font you choose)


With UILabel your best bet is a font that does what you need. Most likely you will have to implement drawing part by yourself. It will not be easy what your are asking.

0

精彩评论

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

关注公众号