Closed sergey-zhuravel closed 9 years ago
Check the build https://github.com/guilhermearaujo/GUITabPagerViewController/commit/7cbed10d402699ebf30129c8ea0a3f44288f956c to see if it solves your alignment issue. I opted for centering the tabs without changing their widths. I may try later another branch increasing their width to see which looks better.
As for the insets with the translucent navigation bar, I am yet to think how to fix that. If you do have some time (more than I do), a pull request will be appreciated.
There are some problems related to this: Take a look at my fork, there are some of them solved: https://github.com/Urkman/GUITabPagerViewController
You can solve your problem, by disabling "Under Top Bars" for your ViewController...
And also call [self reloadData] is viewDidAppear, because in viewDidLoad the frames are not calculated...
Thank guilhermearaujo, this build (7cbed10) helped me :) it would be more good to tabs stretched the width of the screen. And also will wait corrections to navigation bar ;)
Thank you very much!
Centered tabs were merged into the master branch. The view controller being extended under translucent bars has been fixed too, and reloadData
is being called within viewWillAppear:
.
Tabs will also be redrawn on orientation changes.
All that is available on the new release 0.0.2.
@sergio-men regarding the tabs with extended widths, I would rather not implement that feature because if a user decides to provide a UIView
instead of an NSString
, that could deform the views. I would not like that to happen.
In your case, what you could do is to manually create your views with a single label and adjust their width so the group of tabs match the view's width.