Set UILabel line spacing

后端 未结 10 1562
鱼传尺愫
鱼传尺愫 2020-11-27 10:47

How can I modify the gap between lines (line spacing) in a multiline UILabel?

10条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-11-27 11:00

    My solution was to patch the font file itself and fix its line height definitely. http://mbauman.net/geek/2009/03/15/minor-truetype-font-editing-on-a-mac/

    I had to modify 'lineGap', 'ascender', 'descender' in the 'hhea' block (as in the blog example).

提交回复
热议问题