Skip to content

SwiftTopTabBar is swift library to create top tab bar like android in iOS

Notifications You must be signed in to change notification settings

mohshaat1990/SwiftTopTabBar

Repository files navigation

SwiftTopTabBar

  • crearte tab bar like android material design
  • default cells (title ,image,image with title)
  • Crearte Custome Cell
  • Spport RTL

ezgif com-video-to-gif-2

using pods

  pod 'SwiftTopTabBar' 

Usage

Screen Shot 2019-06-29 at 1 05 16    AM

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
    }

About

SwiftTopTabBar is swift library to create top tab bar like android in iOS

Resources

Stars

Watchers

Forks

Packages

No packages published