Skip to content

Commit

Permalink
Merge pull request #11 from serluca/master
Browse files Browse the repository at this point in the history
Fix issue #10
  • Loading branch information
rivera-ernesto committed Aug 18, 2015
2 parents e55553f + f9aebce commit 16d2763
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions Source/PTEDashboard.m
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ - (instancetype)initWithFrame:(CGRect)frame
}

// Load Storyboard
self.rootViewController = [[UIStoryboard storyboardWithName:@"LumberjackConsole"
bundle:nil] instantiateInitialViewController];
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"LumberjackConsole" bundle:[NSBundle bundleForClass:[self class]]];
self.rootViewController = [storyboard instantiateInitialViewController];
// Save references
NSArray * subviews = self.rootViewController.view.subviews;
_consoleTableView = subviews[0];
Expand Down Expand Up @@ -107,13 +107,12 @@ - (void)handleStatusBarOrientationChange:(NSNotification *)notification

// Flip the window's height and width?
CGRect frame = self.frame;
if ((UIDeviceOrientationIsLandscape(currentOrientation) && UIDeviceOrientationIsPortrait(nextOrientation)) ||
(UIDeviceOrientationIsPortrait(currentOrientation) && UIDeviceOrientationIsLandscape(nextOrientation)))
if ((UIInterfaceOrientationIsLandscape(currentOrientation) && UIInterfaceOrientationIsPortrait(nextOrientation)) ||
(UIInterfaceOrientationIsPortrait(currentOrientation) && UIInterfaceOrientationIsLandscape(nextOrientation)))
{
frame.size = CGSizeMake(frame.size.height,
frame.size.width);
frame.size = CGSizeMake(frame.size.height,frame.size.width);
}
// Calculate the transform and origin
CGAffineTransform transform;
switch (nextOrientation)
Expand Down

0 comments on commit 16d2763

Please sign in to comment.