TabLayout is a View that allows us to switch view controller.
Copy TabLayout.swift to your project.
To run the example project, clone the repo, and run pod install from the Example directory first.
@IBOutlet var tabLayout: TabLayout!
tabLayout.addTabs(tabs: [
("First", UIImage.init(named: "ic_favorite"), firstViewController),
("Second", UIImage.init(named: "ic_verified_user"), secondViewController),
("Third", UIImage.init(named: "ic_favorite"), thirdViewController)
])
@IBOutlet var tabLayout: TabLayout!
tabLayout.addTabs(tabs: [
("First", nil, firstViewController),
("Second", nil, secondViewController),
("Third", nil, thirdViewController)
])
@IBOutlet var tabLayout: TabLayout!
tabLayout.addTabs(tabs: [
(nil, UIImage.init(named: "ic_favorite"), firstViewController),
(nil, UIImage.init(named: "ic_verified_user"), secondViewController),
(nil, UIImage.init(named: "ic_favorite"), thirdViewController)
])
@IBOutlet var tabLayout: TabLayout!
tabLayout.fixedMode = true
tabLayout.addTabs(tabs: [
(nil, UIImage.init(named: "ic_favorite"), firstViewController),
(nil, UIImage.init(named: "ic_verified_user"), secondViewController)
])
Digers, bartosz.kozajda@dige.pl
TabLayout is available under the MIT license. See the LICENSE file for more info.