I was reading this post for advice on how to vertically align text within a UILabel, and the top comment seemed to present a great solution.
I have my UILabel
,with number of lines to 0. Then in viewDidLoad
for the View Controller it's a part of, I called sizeToFit
on it, but it still only occupies the middle.
It looks like this in Interface Builder:
And looks the exact same when I run it, the text is still really far away from the navigation bar when I'd prefer it to be very close, preferably at the top of that outline box.
What am I doing wrong?