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

后端 未结 6 2124
长发绾君心
长发绾君心 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:39

    you can put multiple lines of text in UILabel to solve your issue.

    textLabel.lineBreakMode = NSLineBreakByWordWrapping;
    textLabel.numberOfLines = 0;
    textLabel.adjustsFontSizeToFitWidth = YES;
    

    Courtesy:-https://stackoverflow.com/a/990244/1865424

    It may help you.

提交回复
热议问题