I'm currently dealing with an iphone view controller which contains a paging UIScrollView, to display multiple pages of information. My application needs to support a landscape mode, and I've been having a bit of trouble figuring out the right way to implement this.
In order to maintain view continuity, I want to resize my views manually in two steps. First, I override willRotateToInterfaceOrientation. In this method I extend the width of all my views in the paging scroll view to the width that they'll end up at in landscape mode. Then, in didRotateToInterfaceOrientation, I reduce the height of the views to fit the height of the landscape mode.
My question is, how do I determine the new width and height to resize my views? Hardcoding the exact values feels like a bad hack, and I get the sense that there must be an elegant way of solving the problem.