1

In my app I have two labels. Second one should be positioned below the first one (with some small const padding). The first label is multi-lined and takes all possible width. So after changing interface orientation, its real height can change (because necessary line number can change). That's why autoresizing mask can't help me here.

So.. How can I control this and display labels correctly even during interface orientation change animation?

kpower
  • 3,871
  • 4
  • 42
  • 62

1 Answers1

0

Damn. I'm so sorry about this question. I've really googled before asking and tried to read docs. But somehow I've missed this and this with great details about my question.

kpower
  • 3,871
  • 4
  • 42
  • 62
  • I'm trying to solve the same problem currently. I'm reading some of the documentation you mentioned. Was wondering if you know of a specific direction I should head in. :) I assume `layoutSubviews` is involved? – Michael Luton Oct 25 '12 at 20:43
  • Manually setting the label's frames in `layoutSubviews` is working for me. However, I'm always on the lookout for a more AutoLayout-y way to do this if it involves less code. – Michael Luton Oct 26 '12 at 05:25
  • The main idea, I've found: use `layoutSubviews`! :) The only thing I can suggest here is to make some general setup method. Maybe, as UIView's category - to simplify usage (smth. like "position me inside one view, below the second"). – kpower Oct 29 '12 at 15:32