TestsTested | ✗ |
LangLanguage | SwiftSwift |
License | MIT |
ReleasedLast Release | Sep 2016 |
SPMSupports SPM | ✗ |
Maintained by Ten12.
With the swift implementation ContainerViewController.
To run the example project, clone the repo, and run pod install
from the Example directory first.
ContainerViewController is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "ContainerViewController"
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)
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()
0.1.2 add bottomHeight
0.1.1 custom menuview height and item width
0.1.0 init
JiangTeng, [email protected]
ContainerViewController is available under the MIT license. See the LICENSE file for more info.
MIT