Objective C - UILabel multiline vertical gap height

后端 未结 3 1370
遇见更好的自我
遇见更好的自我 2021-01-15 08:22

I have a multiline UILabel that can take a maximum of 3 lines. i.e message.numberOfLines = 3;

Everything works fine, but how can I set the vertical gap between the l

3条回答
  •  孤城傲影
    2021-01-15 08:49

    Unfortunately, the only good way to do this that I'm aware of is to draw the text yourself. On 3.2 or later, you can use CoreText to draw the text directly - I'm not sure if CT is available on iPhones >= 4.0. CoreText is a functional C API for flexible text drawing.

提交回复
热议问题