Skip to content

Commit

Permalink
Merge pull request #1 from DCritelli/master
Browse files Browse the repository at this point in the history
Fix for loading in the wrong orientation on iPad
  • Loading branch information
rnystrom committed Dec 24, 2012
2 parents 6b4f00e + 964e358 commit 1031fe9
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions RNSwipeViewController/RNSwipeViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -129,18 +129,23 @@ - (void)_init {

- (void)viewDidLoad {
[super viewDidLoad];

CGRect frame = self.view.bounds;
if (UIInterfaceOrientationIsLandscape(self.interfaceOrientation)) {
frame = CGRectMake(0, 0, self.view.height, self.view.width);
}

_centerContainer = [[UIView alloc] initWithFrame:self.view.bounds];
_centerContainer = [[UIView alloc] initWithFrame:frame];
_centerContainer.clipsToBounds = NO;
_centerContainer.layer.masksToBounds = NO;

_centerOriginal = _centerContainer.frame;

_rightContainer = [[UIView alloc] initWithFrame:self.view.bounds];
_rightContainer = [[UIView alloc] initWithFrame:frame];

_leftContainer = [[UIView alloc] initWithFrame:self.view.bounds];
_leftContainer = [[UIView alloc] initWithFrame:frame];

_bottomContainer = [[UIView alloc] initWithFrame:self.view.bounds];
_bottomContainer = [[UIView alloc] initWithFrame:frame];

_centerLastPoint = CGPointZero;

Expand Down

0 comments on commit 1031fe9

Please sign in to comment.