You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
GGTabBar is a simple UITabBar & UITabBarController replacement that uses Auto Layout
for constructing the GUI. I created it for curiosity, but it may be useful
to others who adventure into the land of Auto Layout.
⚠️ This is a work in progress/proof of concept, I'm no expert. Sorry if it's missing some feature you need, feel free to fork, pull request or open issues. I'm available on Twitter if you have further questions 😬👌
Limitations 💣
Still need to add customization options (background color, tint, style, background image, etc.).
The tab bar items are UIButtons (no TabBarItem abstraction in a UIView).
No more tab if you add more than 5 View Controllers.
Still need to add more integration tests.
Install
CocoaPods
pod 'GGTabBar', '~> 0.0.2'
Xcode
Just copy the GGTabBar folder into your Xcode project.
Usage 🚀
⚠️ Your UIViewControllers must set their tabBarItem images (selected/normal).
⚠️ Feel free to explore the provided Example Project to check out how to use GGTabBar.
Structure 🍷
All the views are setup with Auto Layout. There are no CGRect, Struts or Sprints, so unless you break the constraints, everything should work on different screen-sizes.
If you want more information about how the AutoLayout Constraints are specified, please take a look at the tests. It's the best way to understand what's going on here.
Debug 🐛
Normally you won't be doing any sort of Debug, but it something strange happens
you can enable debugMode so that all the UIView's backgrounds are painted.
To enable debug mode:
Objective-C
tabBar.debug = YES;
Swift
tabBar.debug = true
Green Views: Margins, there are always exactly two of them.
Red Views: Separators, located between buttons.
Blue View: The GGTabBar.view.
White Views: Button backgrounds.
Emoji 💩
You got to freakin' ❤️ them 😁!
About
Another UITabBar & UITabBarController (iOS Tab Bar) replacement, but uses Auto Layout for arranging it's views hierarchy.