https://github.com/innocarpe/tabnavigable
A useful protocol and its extension when you make custom TabBarViewController
https://github.com/innocarpe/tabnavigable
cocoapods ios swift tabbarcontroller
Last synced: 4 months ago
JSON representation
A useful protocol and its extension when you make custom TabBarViewController
- Host: GitHub
- URL: https://github.com/innocarpe/tabnavigable
- Owner: innocarpe
- License: mit
- Created: 2017-06-27T04:25:34.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-09-23T06:59:22.000Z (over 8 years ago)
- Last Synced: 2024-04-23T06:25:56.162Z (almost 2 years ago)
- Topics: cocoapods, ios, swift, tabbarcontroller
- Language: Swift
- Homepage:
- Size: 39.1 KB
- Stars: 5
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# TabNavigable

[](https://cocoapods.org/pods/TabNavigable)
[](https://travis-ci.org/innocarpe/TabNavigable)
[](https://codecov.io/gh/innocarpe/TabNavigable/)
## Example
```swift
class CustomTabBarViewController: UIViewController, TabNavigable {
var containerView: UIView!
var viewControllers: [UIViewController]! = []
override func viewDidLoad() {
super.viewDidLoad()
initViewControllers()
}
private func initViewControllers() {
addViewController()
addViewController()
addViewController()
changeActiveViewController(index: 0)
}
private func addViewController() {
let viewController = YourTabViewController()
viewControllers.append(viewController)
}
func tabButtonDidTap(index: Int) {
changeActiveViewController(index: index)
}
}
```
## Installation
TabNavigable is available through [CocoaPods](http://cocoapods.org). To install
it, simply add the following line to your Podfile:
```ruby
pod "TabNavigable"
```
## Contribution
For your convenience, execute the line below to generate xcodeproj.
```console
$ swift package generate-xcodeproj
```
## Author
Wooseong Kim, innocarpe@gmail.com
## License
TabNavigable is available under the MIT license. See the LICENSE file for more info.