splitViewSizeForOrientation needs to account for navBar #52

sbonami opened this Issue Dec 31, 2011 · 0 comments

1 participant


I found that the navBar height was not being subtracted from the height of the master view, affecting a custom tabbar. Added the following code to make that work:

- (CGSize)splitViewSizeForOrientation:(UIInterfaceOrientation)theOrientation

// Other code

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

// new code
    if (!self.navigationController.navigationBarHidden) {
        height -= self.navigationController.navigationBar.frame.size.height;
// end new code

    return CGSizeMake(width, height);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment