Created
November 22, 2011 10:46
-
-
Save hatfinch/1385399 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)performLayout | |
{ | |
[super performLayout]; | |
myScrubView.frame = self.bounds; | |
BOOL reload = NO; | |
UIInterfaceOrientation orientation = [[UIApplication sharedApplication] statusBarOrientation]; | |
if (orientation == UIInterfaceOrientationPortrait) | |
{ | |
myLandscapeView.alpha = 0.0; | |
if (myPortraitView) | |
myPortraitView.alpha = 1.0; | |
else | |
{ | |
myPortraitView = [[UIView alloc] init]; | |
[myScrubView addSubview:myPortraitView]; | |
reload = YES; | |
} | |
myPortraitView.frame = myScrubView.bounds; | |
} | |
else | |
{ | |
myPortraitView.alpha = 0.0; | |
if (myLandscapeView) | |
myLandscapeView.alpha = 1.0; | |
else | |
{ | |
myLandscapeView = [[UIView alloc] init]; | |
[myScrubView addSubview:myLandscapeView]; | |
reload = YES; | |
} | |
myLandscapeView.frame = myScrubView.bounds; | |
} | |
if (reload) | |
[self reloadData]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment