I have UIView
which has a child UILabel
. I have read the following SO post about aligning the text to the top of the view : Vertically align text to top within a UILabel. I see the approach discussed here in different methodologies, but I have a special case: I don't want the UILabel
in my case to go past the bottom boundary of the UIView
. This seems though to prevent the auto resizing of the UILabel
since now it is pinned to all four directions (Trailing, Leading, Top, and Bottom). Is this impossible to achieve?
The solution presented in the above SO post suggested doing Trailing Leading and Top with the idea that it would resize the Vertical dimension based on the instrinsic size.