2

I have a super basic program where I am trying to figure out how autolayout works. This is my storyboard:

enter image description here

The TableViewController orientation setting is "inferred". The numberOfLines setting has been set to 0. The "long text~" UILabel is supposed to be about "Default" pixels to the right of "random label" and 45 pixels as a trailing space from the UITableViewCell.

This is my result in simulator in portrait mode:

enter image description here

As you can see, it is 100% what you would expect.

However this is what we see in landscape mode:

enter image description here

What happened in landscape mode? Why did all my text shift down a little? The UILabel is supposed to be only 4 pixels from the top of the cell. Can anyone explain this??

4

1 回答 1

0

我已经解决了这个问题!

嘿帕斯卡,谢谢你的回答。我这样做了,并意识到你是对的。我所要做的就是调用 [UILABEL sizeToFit]。感谢您的帮助 :D – Woodless 19 小时前

于 2013-07-16T18:11:44.320 回答