Skip to content
This repository has been archived by the owner on Apr 24, 2022. It is now read-only.

How to add a UIToolbar / UINavigationBar above the view pager? #133

Open
shivanraptor opened this issue Oct 15, 2015 · 5 comments
Open

How to add a UIToolbar / UINavigationBar above the view pager? #133

shivanraptor opened this issue Oct 15, 2015 · 5 comments

Comments

@shivanraptor
Copy link

I can't find a way to add a UIToolbar / UINavigationBar above the view pager? How can I adjust the vertical position of the view pager?

@desnyki
Copy link

desnyki commented Oct 15, 2015

you don't add the navigation bar to the view pager. You add the view pager to the navigation bar. Create a NavigationController in the storyboard. Then set your viewpager controller as the controller for the view.

@shivanraptor
Copy link
Author

Okay, but more problems occurred. Can you look into this?

http://stackoverflow.com/questions/33338487/strange-spaces-at-the-top-bottom-of-icviewpager

When using with UITabbarController and UINavigationController, the ICViewPager does not span across the full height that it should be.

Screenshot

How do I solve this case?

@rafaelpereznajera
Copy link

remove this on - (void)layoutSubviews

// if (IOS_VERSION_7) {
// topLayoutGuide = 20.0;
// if (self.navigationController && !self.navigationController.navigationBarHidden) {
// topLayoutGuide += self.navigationController.navigationBar.frame.size.height;
// }
// }

@shivanraptor
Copy link
Author

Confirmed working. It should be a bug.

@shesio
Copy link

shesio commented Jul 4, 2018

It still have the bug

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants