Skip to content

Commit

Permalink
Merge pull request #49 from aogilvie/bugfix/landscapeLayouts
Browse files Browse the repository at this point in the history
fix for landscape layouts
  • Loading branch information
aogilvie committed Mar 14, 2014
2 parents 7d39379 + 20d8b60 commit 1436d24
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions ios/project/Plugins/WizViewManagerPlugin/WizViewManagerPlugin.m
Original file line number Diff line number Diff line change
Expand Up @@ -715,8 +715,15 @@ - (CGRect)frameWithOptions:(NSDictionary *)options {

// Get Device width and height
CGRect screenRect = [[UIScreen mainScreen] bounds];
int screenHeight = (int) screenRect.size.height;
int screenWidth = (int) screenRect.size.width;
int screenHeight;
int screenWidth;
if (UIDeviceOrientationIsLandscape(self.viewController.interfaceOrientation)) {
screenHeight = (int) screenRect.size.width;
screenWidth = (int) screenRect.size.height;
} else {
screenHeight = (int) screenRect.size.height;
screenWidth = (int) screenRect.size.width;
}

// Define vars
int top;
Expand Down

0 comments on commit 1436d24

Please sign in to comment.