UITabBarController is a handy control for building user interfaces, but it has an annoying limitation: if there are more than five tabs, a "More" button replaces the fifth tab. The user might not understand what "More" means or the fact that it hides additional controllers.
JFATabBarController is a pluggable replacement for
UITabBarController that eliminates this limitation. The user of this control can access an arbitrary number of controllers simply by swiping left on the tab bar. By default,
JFATabBarController displays an exciting animation when changing tabs.
JFATabBarController, just clone the repository, double-click
JFATabBarController.xcodeproj, and run on an iPhone or iPad simulator or device.
Here are the steps to use
JFATabBarController in your app. These instructions assume familiarity with use of
JFAArrowView.hto your project. Alternatively, add
pod 'JFATabBarController'to your
Podfileand do a
UITabBarControllerin your storyboard, add one.
JFATabBarControllerby selecting it, opening the Utilities pane, showing the Identity inspector, and changing the class to
JFATabBarControllerto each view controller you want accessible from the tab bar.
There are two constants of interest in
MAX_TAB_COUNT is the maximum number of tab-bar items to show at once. You are not limited to
TAB_ANIMATION_DURATION is the duration of the tab-changing animation. The larger the number, the longer the duration. Set this to 0.0 to prevent animation.
JFATabBarController has been tested on iPhone SE, iPhone X, iPhone 🎾, iPhone 🎾 Max, iPad XR, and iPad Pro.
Because the app for which
JFATabBarController was created, Immigration, has no need for
UITabBarController’s localization, badge, or accessibility features,
JFATabBarController does not currently support them. The app may require these features at some point, and
JFATabBarController will support them then. Pull requests are welcome.
The MIT License (MIT) Copyright (c) 2014 Josh Adams Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.