Skip to content

Latest commit

 

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

YSTabBar

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

convex hole holeFourItems

Requirements

  • Xcode 14+
  • Swift 5+
  • iOS 15+

Installation

YSTabBar is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'YSTabBar'

About

YSTabBar is fully customizable tab bar controller which has unique center item.

Usage

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

Author

Yerem Sargsyan eresar01@gmail.com

https://www.linkedin.com/in/eresar01/

License

YSTabBar is available under the MIT license. See the LICENSE file for more info.

About

Exclusive TabBarController in Swift

Topics

Resources

Stars

10 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages