Latest 1.0.3
Homepage https://github.com/jiangteng/ContainerViewController
License MIT
Platforms ios 8.0
Authors

CI Status
Version
License
Platform

About

With the swift implementation ContainerViewController.

YSLContainerViewController

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

ContainerViewController

Requirements

  • Xcode 8.0+
  • iOS 8.0+
  • Swift 3.0+

Installation

ContainerViewController is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "ContainerViewController"

Usage

    let sampleVC1:UIViewController = UIViewController()
    sampleVC1.title = "sampleVC1"
    sampleVC1.view.backgroundColor = UIColor.blueColor()

    let sampleVC2:UIViewController = UIViewController()
    sampleVC2.title = "sampleVC2"

    let sampleVC3:UIViewController = UIViewController()
    sampleVC3.title = "sampleVC3"
    sampleVC3.view.backgroundColor = UIColor.redColor()

    let sampleVC4:UIViewController = UIViewController()
    sampleVC4.title = "sampleVC4"

    // ContainerView
    let statusHeight:CGFloat = UIApplication.sharedApplication().statusBarFrame.height
    let navigationHeight:CGFloat = (self.navigationController?.navigationBar.frame.height)!

    let contaninerVC = TNContainerViewController.init(controllers: [playListVC,artistVC,sampleVC1,sampleVC2,sampleVC3,sampleVC4,sampleVC5], topBarHeight: statusHeight + navigationHeight, parentViewController: self)
    contaninerVC.menuItemFont = UIFont.systemFontOfSize(16)
    contaninerVC.delegate = self
    contaninerVC.menuIndicatorColor = UIColor.redColor()
    contaninerVC.menuItemTitleColor = UIColor.purpleColor()
    contaninerVC.menuItemSelectedTitleColor = UIColor.yellowColor()             
    self.view.addSubview(contaninerVC.view)

Property

contaninerVC.menuItemFont = UIFont.systemFontOfSize(16)
contaninerVC.menuBackGroudColor = UIColor.whiteColor()
contaninerVC.menuWidth = self.view.frame.width * 0.5 - 10.0
contaninerVC.indicatorHeight = 1.0
contaninerVC.menuViewHeight = 80
contaninerVC.menuIndicatorColor = UIColor.blueColor()
contaninerVC.menuItemTitleColor = UIColor.blackColor()
contaninerVC.menuItemSelectedTitleColor = UIColor.blueColor()        

To Do

log

1.0.3 swift 3.0

0.1.2 add bottomHeight

0.1.1 custom menuview height and item width

0.1.0 init

Author

JiangTeng, [email protected]

License

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

MIT

Latest podspec

{
    "name": "ContainerViewController",
    "version": "1.0.3",
    "summary": "ContainerViewController.",
    "description": "Add long description of the pod here.",
    "homepage": "https://github.com/jiangteng/ContainerViewController",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "JiangTeng": "[email protected]"
    },
    "source": {
        "git": "https://github.com/jiangteng/ContainerViewController.git",
        "tag": "1.0.3"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "ContainerViewController/Classes/**/*"
}

Pin It on Pinterest

Share This