I have a subclass of UIViewController whose presentation is configured in a NIB file. The view is subtitled UIScrollView.
UIScrollView processes almost its entire NIB file, but its supervisor is added as a subtitle to a much smaller view (configured in another NIB) - for example. UIScrollView is 80% of the height of its own NIB, but in the end it is only 10% of the application window height.
When I call [scrollView bounds] .size.height in the viewController viewDidLoad method, I get the height of the scrollView relative to its own NIB, and not the height that ends with the resize, as dictated by its supervisors (for example, 80% of the window height, not ten%).
If I call [scrollView bounds] .size.height later (for example, to handle the rotation event), I get the correct value.
How can I get the correct resizing initially?
source share