Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions Classes/MGSplitViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,11 @@ - (CGSize)splitViewSizeForOrientation:(UIInterfaceOrientation)theOrientation
// Little bit ugly looking, but it'll still work even if they change the status bar height in future.
float statusBarHeight = MAX((fullScreenRect.size.width - appFrame.size.width), (fullScreenRect.size.height - appFrame.size.height));

float navigationBarHeight = 0;
if ((self.navigationController)&&(!self.navigationController.navigationBarHidden)) {
navigationBarHeight = self.navigationController.navigationBar.frame.size.height;
}

// Initially assume portrait orientation.
float width = fullScreenRect.size.width;
float height = fullScreenRect.size.height;
Expand All @@ -243,6 +248,7 @@ - (CGSize)splitViewSizeForOrientation:(UIInterfaceOrientation)theOrientation

// Account for status bar, which always subtracts from the height (since it's always at the top of the screen).
height -= statusBarHeight;
height -= navigationBarHeight;

return CGSizeMake(width, height);
}
Expand Down