Change character spacing on UILabel within Interface Builder

前端 未结 13 2675
说谎
说谎 2020-12-23 09:21

Is there anyway to change the character spacing (track) on UILabel text using Interface Builder? If not, is there a way to do it programmatically on an existing UILabel that

13条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-23 09:34

    Why all of you are defining NSMUTABLEAttributedString. You don't have to set range explicitly. It makes emojis looks weird sometimes. This is my solution, tested in Swift 4.

提交回复
热议问题