开发者

Drawing text, newline character, Quartz 2D

开发者 https://www.devze.com 2023-03-19 15:26 出处:网络
I was trying to draw a text in Quartz.For example: 20.0% 1/开发者_Python百科5 I thought I could do something like this:

I was trying to draw a text in Quartz. For example:

20.0%
1/开发者_Python百科5

I thought I could do something like this:

NSString *label = [NSString stringWithFormat:@"%1.1f%%\n1/5",someValue * 100];

However the newline gets drawn as a box. Is there a way around this? Thanks!


Split up the string into separate text elements, each on their own line.

0

精彩评论

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

关注公众号