How to debug the following problem? Is there any way around this problem?
There seems to be a bug in iOS 10.2 and below when creating multi-line UILabel.
I have a fairly simple subclass of UIView, which I use both in the extension of the contents of the application and in the notification, which looks like this:

In the main application, everything was laid out just fine:

If the extension displays notification content on iOS 10.2 and below, the layout is broken. But only when the text is long enough to break into several lines. It seems like iOS cannot calculate the correct height of the whole view:

However, this problem seems to be fixed on iOS 10.3 and later:

source share