The problem is simple: you create an app in portrait mode, think about the landscape UI and figure that all you want is the same controls, but just a different layout.
BSUIViewRearranger is a simple class that helps with exactly that. You create two nibs, one for portrait, one for landscape and then you let BSUIViewRearranger do all the figuring outs for you.
In your view controller you implement the method to make your app work in landscape mode:
and the rotation method is implemented like that:
- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration
[UIView animateWithDuration:duration animations:^(void)
[BSUIViewRearranger rearrangeView: self.view
controllerClass: [self class]];
That's all you need to do. You pass the view, the orientation and the nib names. You also need to pass the view controller class that can open the nibs.
The algorithm to rearrange the views is no magic and doesn't have any heuristics about how to match the views. It only assumes one thing: both nibs create a view that has the exact same structure. Easiest thing to do is save your nib in portrait mode and then save it under a new name, rotate it and rearrange your controls. Do not nest views in one nib but not in the other!