, .
. "" .
TabBarController ro
- (void) willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration {
[self adjustViewsForOrientation:toInterfaceOrientation];
}
- (void) adjustViewsForOrientation:(UIInterfaceOrientation)orientation {
if (orientation == UIInterfaceOrientationLandscapeLeft || orientation == UIInterfaceOrientationLandscapeRight) {
NSLog(@"Landscape");
}
else if (orientation == UIInterfaceOrientationPortrait || orientation == UIInterfaceOrientationPortraitUpsideDown) {
NSLog(@"Portrait");
}
}
"viewControllers" TabBarController . , :
- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation {
for (int i = 0; i < [self.viewControllers count]; i++ ) {
[[self.viewControllers objectAtIndex:i] didRotateFromInterfaceOrientation:fromInterfaceOrientation];
}
}
didRotateFromInterfaceOrientation TabBarController:
- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation{
[self adjustViewsForOrientation:self.interfaceOrientation];
}
- (void) adjustViewsForOrientation:(UIInterfaceOrientation)orientation {
if (orientation == UIInterfaceOrientationLandscapeLeft || orientation == UIInterfaceOrientationLandscapeRight) {
NSLog(@"Subview Landscape");
}
else if (orientation == UIInterfaceOrientationPortrait || orientation == UIInterfaceOrientationPortraitUpsideDown) {
NSLog(@"Subview Portrait");
}
}
, [self adjustViewsForOrientation:self.interfaceOrientation]; Sub Viewcontroller, Orientation . InInterfaceOrientation, , !
UISplitviewController TabBarController, , . , UIViewControllers. , , , 100%. -, cutsom Splitview. , , :
http://blog.trustedones.com/development/ipad-uisplitviewcontroller-replacement-for-sethidesmasterviewinportrait
http://www.trustedones.com/apps/ipad
SplitView , . !
, - .
nettz