You can perform the processing as shown below -
-(void) viewWillAppear: (BOOL) animated { [super viewWillAppear: animated]; [self updateLayoutForNewOrientation: self.interfaceOrientation]; } -(void) willAnimateRotationToInterfaceOrientation: (UIInterfaceOrientation) interfaceOrientation duration: (NSTimeInterval) duration { [self updateLayoutForNewOrientation: interfaceOrientation]; }
and then finally the user method -
- (void) updateLayoutForNewOrientation: (UIInterfaceOrientation) orientation { if (UIInterfaceOrientationIsLandscape(orientation)) {
}
user1136784
source share