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

Initial load of masterView is too tall #53

Open
marsara9 opened this issue Jan 18, 2012 · 0 comments
Open

Initial load of masterView is too tall #53

marsara9 opened this issue Jan 18, 2012 · 0 comments

Comments

@marsara9
Copy link

My hierarchy consists of a UINavigationController which contains the MGSplitViewController and then inside the MGSplitViewController I have another UINavigationController in the masterView and a UIViewController in the detailView. Then inside the second UINavigationController I have a series of UITableViews.

Whenever I display the first UITableView, whenever I'm in landscape, the UITableView is 44px too tall (the height of a navigation bar). If I change orientations and change back, the view renders correctly.

What I have found out, is that [MGSplitViewController splitViewSizeForOrientation:] returns the correct size every time, but if print out the actual height of the UITableView after it loads (or changes orientation) the height is incorrect by 44px on load. On load the UITableView is 748px tall but after an orientation change it is 704px tall for landscape.

I've tried loading the second UINavigationController on its own and I've tried loading the first UITableView without the UINavigationController, and I've tried just loading the UITableView on its own. As soon as I remove MGSplitViewController from the hierarchy everything renders correctly.

So far my workaround has been to just keep track of the first time [MGSplitViewController layoutSubviewsForInterfaceOrientation:withAnimation:] and subtract the height of the navigation bar from the masterView, if it's in landscape orientation, otherwise calculate the dimensions normally.

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