Latest 0.0.1
Homepage https://github.com/cemolcay/SlidingContainerViewController
License MIT
Platforms ios 8.0, requires ARC
Authors

An android scrollable tab bar style container view controller

Demo

alt tag

Install

Manual

Copy & paste Source folder to your project

Cocoapods

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:

 let slidingContainerViewController = SlidingContainerViewController (
   parent: self,
   contentViewControllers: [vc1, vc2, vc3, vc4],
   titles: ["First", "Second", "Third", "Forth"])

 view.addSubview(slidingContainerViewController.view)

SlidingContainerViewControllerDelegate

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

struct SlidingContainerSliderViewAppearance {
  var backgroundColor: UIColor

  var font: UIFont
  var selectedFont: UIFont

  var textColor: UIColor
  var selectedTextColor: UIColor

  var outerPadding: CGFloat
  var innerPadding: CGFloat

  var selectorColor: UIColor
  var selectorHeight: CGFloat
}

Latest podspec

{
    "name": "SlidingContainerViewController",
    "version": "0.0.1",
    "summary": "An Android scrollable tab bar style container view controller",
    "description": "SlidingContainerViewControllern==============================nnAn [android scrollable tab bar](http://developer.android.com/design/building-blocks/tabs.html#scrollable) style container view controllernnnDemon----nn![alt tag](https://raw.githubusercontent.com/cemolcay/SlidingContainerViewController/master/demo.gif)nnnInstalln-----nn#### ManualnnCopy & paste `Source` folder to your projectnn#### Cocoapodsnn```nuse_frameworks!npod 'slidingContainerViewController'n```nnnUsagen-----nnCreate a `UIViewController` as container, setup your tab view controllers and implement `SlidingContainerViewController` and add its view to view controller's view like:nn``` swiftn   let slidingContainerViewController = SlidingContainerViewController (n       parent: self,n       contentViewControllers: [vc1, vc2, vc3, vc4],n       titles: ["First", "Second", "Third", "Forth"])nn   view.addSubview(slidingContainerViewController.view)n```nnnSlidingContainerViewControllerDelegaten---------------------------------------nn``` swiftnprotocol SlidingContainerViewControllerDelegate {n    func slidingContainerViewControllerDidMoveToViewController (slidingContainerViewController: SlidingContainerViewController, viewController: UIViewController, atIndex: Int)n    func slidingContainerViewControllerDidHideSliderView (slidingContainerViewController: SlidingContainerViewController)n    func slidingContainerViewControllerDidShowSliderView (slidingContainerViewController: SlidingContainerViewController)n}nn```nnnSlidingContainerSliderViewn--------------------------nnThe tab bar slider view in the sliding container view controller.nFully customisable with its `appearance` property.nnnSlidingContainerSliderViewAppearancen------------------------------------nn``` swiftntstruct SlidingContainerSliderViewAppearance {nnt    var backgroundColor: UIColornnt    var font: UIFontnt    var selectedFont: UIFontnnt    var textColor: UIColornt    var selectedTextColor: UIColornnt    var outerPadding: CGFloatnt    var innerPadding: CGFloatnnt    var selectorColor: UIColornt    var selectorHeight: CGFloatnt}n```",
    "homepage": "https://github.com/cemolcay/SlidingContainerViewController",
    "license": "MIT",
    "authors": {
        "cemolcay": "[email protected]"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/cemolcay/SlidingContainerViewController.git",
        "tag": "0.0.1"
    },
    "source_files": "SlidingContainerViewController/Source/*.swift",
    "requires_arc": true,
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This