Awesome tabbar with water wave effect for IOS written with Swift 4, easy to use it's compatible with all kind of iPhone, iPod and iPads regarding home indicator of X device series in protrait and landscape modes.
1 - It's seperated component and it consist of two files : UICWaveTabbar.xib
and UICWaveTabBar.swift
so you don't need to storyboard. If you like to chage design only make change on .xib
file.
2 - Enable, disable animations
3 - Enable, disable waving effect
4 - Send notification from any VC to show badge on tab button (UserInfo must be [String, tuple(tabIndex, yourMessage)]
)
NotificationCenter.default.post(name: showBadgeNotification, object: nil, userInfo: ["index": (1, "New")])
Usage of UICWavetabBar is super easy 🎉
1 - Download UICWaveTabbar.xib
, UICWaveTabBar.swift
files and import them to your project.
2 - Just create an UITabbarController
and use your custom tabbar.
private var customTabBar: UICWaveTabBar!
override func viewDidLoad() {
super.viewDidLoad()
tabBar.isTranslucent = false
tabBar.backgroundColor = .clear
tabBar.tintColor = .clear
viewControllers = DataProvider.shared.provideMockViewControllers()
let iconList = DataProvider.shared.provideTabIconList()
let titleList = DataProvider.shared.provideTabTitlesList()
customTabBar = UICWaveTabBar(frame: tabBar.frame)
customTabBar.setupIconsAndTitles(iconList: iconList, titleList: titleList)
customTabBar.delegate = self
customTabBar.translatesAutoresizingMaskIntoConstraints = false
view.addSubview(customTabBar)
NSLayoutConstraint.activate([
customTabBar.widthAnchor.constraint(equalTo: tabBar.widthAnchor),
customTabBar.heightAnchor.constraint(equalTo: tabBar.heightAnchor),
customTabBar.bottomAnchor.constraint(equalTo: tabBar.bottomAnchor),
customTabBar.centerXAnchor.constraint(equalTo: tabBar.centerXAnchor)
])
}
// delegate method
func tabChanged(_ tabBarView: UICWaveTabBar, toIndex: Int) {
self.selectedIndex = toIndex
}
For more information please browse example project
Note 2: For more than 5 view controllers you must hide navigation bar thats appear automatically (more).
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
navigationController?.setNavigationBarHidden(true, animated: animated)
}
UICExpandableCenterTabBar, add 7 view controllers in your tabbar. 2 buttons hidden inside center button 🌟 when you press they will appear
UICSlideTabBar is scrollable tabbar, you can add infinity items to it.
It has glow effect, blurred background, image for background, tracking horizontal bar etc. and you can customize as you want.
Xcode 9 or later
iOS 10.0 or later
Swift 4 or later
The MIT License (MIT)