Простой способ сделать это - реализовать метод в представлении, который разместит его подпредставления в соответствии с UIInterfaceOrientation.
Затем этот метод можно вызвать из UIViewController при обнаружении вращения.
Например:
В YourView.h
@interface YourView : UIView {
}
// Public API
- (void)placeWidgetsForInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation;
@end
In YourView.m
#import "YourView.h"
@implementation YourView
...
#pragma mark -
#pragma mark Public API
- (void)placeWidgetsForInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
// Change frames of subviews according to orientation in here
}
@end
Тогда в YourController.m
- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration {
YourView *theView = (YourView *) self.view; // Or where ever your view is
[theView placeWidgetsForInterfaceOrientation:toInterfaceOrientation];
}