Latest 1.0.1
License MIT
Platforms ios 9.0, requires ARC
Frameworks UIKit

Tab menu with page view controller

Minimum Requirements

Swift 3.0
XCode 8.0


Using CocoaPods

pod 'ICTabFragment'


  1. Create ViewController and also ViewController class (Parent ViewController)
  2. Add UIView that will use as tab menu bar
  3. Add UIView that will use as container child ViewController
  4. Create child ViewController (more than 1 ViewController) don’t forget to set identifier of each ViewController
  5. Import ICTabFragment to use ICTabFragment in your file.


import UIKit
import ICTabFragment

class ViewController: UIViewController {
    @IBOutlet weak var tabView: UIView!
    @IBOutlet weak var containerView: UIView!

    override func viewDidLoad() {

        let tabs = [
            ICTabModel(tabName: "One", tabView: storyboard?.instantiateViewController(withIdentifier: "FirstViewController") as! FirstViewController),
            ICTabModel(tabName: "Two", tabView: storyboard?.instantiateViewController(withIdentifier: "SecondViewController") as! SecondViewController),
            ICTabModel(tabName: "Three", tabView: storyboard?.instantiateViewController(withIdentifier: "ThirdViewController") as! ThirdViewController)

        let tabFragment = ICTabFragmentViewController(context: self, tabs: tabs, tabView: viewTest, containerView: containerTest)

Custom Properties

If you want to custom tab menu then you can set properties before create method was called

    open var textColorSelected: UIColor

    open var textColorUnselected: UIColor

    open var indicatorColorSelected: UIColor

    open var indicatorHeight: CGFloat

    open var indicatorTopSpace: CGFloat

    open var textFont: UIFont

    open var tabSize: ICTabSize

    open var tabFitSize: CGFloat

    open var tabLineSpacing: CGFloat

    open var tabInterSpacing: CGFloat

then call create method



you can call delegate to get current view on containerview

    tabFragment.delegate = self

    extension ViewController: ICTabFragmentDelegate {
        func currentViewController(_ viewController: UIViewController) {
            *   Define your logic here


2017, Digital Khrisna Aurum, [email protected]


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

Latest podspec

    "name": "ICTabFragment",
    "platforms": {
        "ios": "9.0"
    "summary": "Tab menu with page view controller",
    "requires_arc": true,
    "version": "1.0.1",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    "authors": {
        "Digital Khrisna": "[email protected]"
    "homepage": "",
    "source": {
        "git": "",
        "tag": "1.0.1"
    "frameworks": "UIKit",
    "source_files": "ICTabFragment/**/*.{swift}",
    "pushed_with_swift_version": "3.0"

Pin It on Pinterest

Share This