Text not displaying on UILabel when the text is too large.

后端 未结 6 2153
长发绾君心
长发绾君心 2020-12-19 04:36

I have a text (Story of a book). I am taking UILabel to display it. But it is not showing me on view. I am using the following code:

    CGSize labelsize;
           


        
6条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-19 05:13

    I experienced the same thing lately, the UILabel size is allocated correctly, it's just the UILabel itself cannot hold too many characters, the maximum character limit depends on font and font size.

    For the font I used, the limit is around 13k characters. My work around is to truncate the string before hand, it's not ideal though.

提交回复
热议问题