- crearte tab bar like android material design
- default cells (title ,image,image with title)
- Crearte Custome Cell
- Spport RTL
using pods
pod 'SwiftTopTabBar'
import UIKit
// extend TabBarContainerViewController
class TabBarViewController: TabBarContainerViewController{
}
// call in viewDidLoad()
func setupTabBar() {
self.topBarView = barView
self.barcontainer = container
self.tabBarShouldFillWidth = true
// self.tabBarWidth = 70 // tabBarShouldFillWidth should be false
self.indicatorHeight = 3
self.selectedIndicatorColor = UIColor.green
self.moveTo(page: 0)
}
// implement TabBarDataSourse
class SlideViewControllerWithTitle: UIViewController, TabBarDataSourse {
}
// to configure tab bar cell in slide
func cellTabName() -> String {
return TabBarCollectionViewCellImage.resusableName
}
func configureTabCell(collectionView: UICollectionView, indexpath:IndexPath) -> UICollectionViewCell {
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: self.cellTabName(), for: indexpath) as! TabBarCollectionViewCellImage
cell.imageView.image = UIImage(named:"icon_productTabBarItem_active")
return cell
}