I have an iPad screen with a UILabel title and three UILabels immediately below it. I can center the title by stretching out the dimensions of the title UILabel and centering within the label. How can I keep the UILabels below it centered when I change orientation?
Visually it should look something like this:
开发者_C百科 My Title Foo: 10 / Bar: 20
You can group the 3 labels in a small UIView and configure that view in Interface Builder to always stay centered horizontally (with the autosizing properties, just put all horizontal arrows and lines there to the dashed version instead of solid red).
Of course you need to have "autoresize subviews" on the parent UIView enabled for this to work
精彩评论