How to tell when a UILabel will be truncated an/or its line break position will change

后端 未结 5 1302
栀梦
栀梦 2021-01-13 01:38

I have a multi-line UILabel (numberOfLines = 0). It\'s width can change at runtime, and sometimes this leads to truncation and/or re-wrapping. Some

5条回答
  •  再見小時候
    2021-01-13 02:35

    For versions higher than iOS 7, you can check the following solutions:

    1. https://stackoverflow.com/a/30813691/2123122
    2. https://stackoverflow.com/a/32094824/2123122

提交回复
热议问题