Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

splitViewSizeForOrientation needs to account for navBar #52

Open
sbonami opened this issue Dec 31, 2011 · 0 comments
Open

splitViewSizeForOrientation needs to account for navBar #52

sbonami opened this issue Dec 31, 2011 · 0 comments

Comments

@sbonami
Copy link

sbonami commented Dec 31, 2011

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant