I'm a tad puzzled with this one.
I'm trying programatically to size some UI elements...
The sizing of the elements is based on the size of the parent view (here the detailed view). (I do not want to use the autosize-mask, simply because I can't get the result I want with those)
When running in landscape mode, reading the frame size of my current view in UIViewDidAppear
, the size I get is always 1024 pixels wide, which obviously isn't going to be the case once everything has been displayed (it will be 1024 minus the width of root controller (320 pixels) = 704 pixels wide)
At what time, and where should I expect the view to have been re-sized, so I can accurately read the frame size.
Obviously I want to do this as early as possible in the view life-cycle, and if possible before anything has been drawn so the user won't see that I'm resizing the objects.
Ideally, I wonder if there's a particular function that is called (similar to UIViewWillAppear
) that I could place my code into.
Thank you