swiftxcodeuilabeltoday-extension

How to make UILabel display multiple lines in the Today Extension?


I have been trying to not ask basic questions on stack overflow, but I cannot find a clue on the Internet related to this problem.

I wish to make my UILabel display multilines in my widget (Today Extension). The "set lines to 0" solution works in the main app, but this doesn't seem to work within the widget. It keeps displaying only one line with '...' at the end.

Does anybody know how to resolve this issue? I will attach some screenshots to explain my problem further.

enter image description here

enter image description here


Solution

  • Increase the line limit number to 3 or more. You can test the multiline wrapping by typing in the label yourself. I know that setting it to '0' is suppose to work however when it comes to alerts and displays it does not always apply. I know that by giving it a number like '3' or '4' it is not dynamic, however, it will solve your problem with the notifications.

    Alternatively you can use the "Autoshrink" feature, you can change it to minimum font size. By doing so, the application will shrink down the text to the font size you provided. Some developers will also suggest checking the box, 'tighten letter spacing'

    hope this helps.