To run the example project, clone the repo, and run pod install
from the Example directory first.
- Xcode 14+
- Swift 5+
- iOS 15+
YSTabBar is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'YSTabBar'
YSTabBar is fully customizable tab bar controller which has unique center item.
YSTabBar has 2 styles - convex and hole
tabBarStyle = .convex
tabBarStyle = .hole
The simplest use-case is setting a TabBarController
import YSTabBar
class MyTabBarController: YSTabBar
tabBarStyle = .hole
let coordinators: [YSTabBarCoorinator] = [FirstVC(), SecondVC()]
coordinators.forEach { $0.correctedInsets = correctedInsets }
viewControllers = coordinators.compactMap { $0 as? UIViewController }
items = coordinators.map { $0.item }
use-case for ViewController
import YSTabBar
class FirstVC: UIViewController, YSTabBarCoorinator {
let item: UITabBarItem = {
let icon = UIImage(systemName: "person")
let item = UITabBarItem(title: "FirstVC", image: icon, selectedImage: nil)
return item
}()
var correctedInsets: UIEdgeInsets = .zero
Yerem Sargsyan eresar01@gmail.com
https://www.linkedin.com/in/eresar01/
YSTabBar is available under the MIT license. See the LICENSE file for more info.