Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cemolcay/SlidingContainerViewController
An android scrollable tab bar style container view controller
https://github.com/cemolcay/SlidingContainerViewController
Last synced: 3 months ago
JSON representation
An android scrollable tab bar style container view controller
- Host: GitHub
- URL: https://github.com/cemolcay/SlidingContainerViewController
- Owner: cemolcay
- License: mit
- Created: 2015-04-10T13:07:05.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2020-11-11T15:49:50.000Z (almost 4 years ago)
- Last Synced: 2024-07-06T12:21:04.920Z (4 months ago)
- Language: Swift
- Homepage:
- Size: 253 KB
- Stars: 217
- Watchers: 16
- Forks: 42
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
SlidingContainerViewController
==============================An [Android scrollable tab bar](http://developer.android.com/design/building-blocks/tabs.html#scrollable) style container view controller
Demo
----![alt tag](https://raw.githubusercontent.com/cemolcay/SlidingContainerViewController/master/demo.gif)
Install
-----#### Manual
Copy & paste `Source` folder to your project
#### Cocoapods
``` ruby
use_frameworks!
pod 'SlidingContainerViewController'
```Usage
-----Create a `UIViewController` as container, setup your tab view controllers and implement `SlidingContainerViewController` and add its view to view controller's view like:
``` swift
let slidingContainerViewController = SlidingContainerViewController (
parent: self,
contentViewControllers: [vc1, vc2, vc3, vc4],
titles: ["First", "Second", "Third", "Forth"])view.addSubview(slidingContainerViewController.view)
```SlidingContainerViewControllerDelegate
---------------------------------------``` swift
protocol SlidingContainerViewControllerDelegate {
func slidingContainerViewControllerDidMoveToViewController (slidingContainerViewController: SlidingContainerViewController, viewController: UIViewController, atIndex: Int)
func slidingContainerViewControllerDidHideSliderView (slidingContainerViewController: SlidingContainerViewController)
func slidingContainerViewControllerDidShowSliderView (slidingContainerViewController: SlidingContainerViewController)
}```
SlidingContainerSliderView
--------------------------The tab bar slider view in the sliding container view controller.
Fully customisable with its `appearance` property.SlidingContainerSliderViewAppearance
------------------------------------``` swift
struct SlidingContainerSliderViewAppearance {
var backgroundColor: UIColorvar font: UIFont
var selectedFont: UIFontvar textColor: UIColor
var selectedTextColor: UIColorvar outerPadding: CGFloat
var innerPadding: CGFloatvar selectorColor: UIColor
var selectorHeight: CGFloat
}
```