• Stars
    star
    303
  • Rank 137,655 (Top 3 %)
  • Language
    Objective-C
  • License
    MIT License
  • Created over 9 years ago
  • Updated over 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

YSLContainerViewController

Demo

Dome

Requirement

not support landscape

Install

Manually

Copy YSLContainerViewController directory to your project.

CocoaPods

Add pod 'YSLContainerViewController' to your Podfile.

Usage

UIViewController *vc1 = [[UIViewController alloc]init];
vc1.title = @"vc1";
UIViewController *vc2 = [[UIViewController alloc]init];
vc2.title = @"vc2";
UIViewController *vc3 = [[UIViewController alloc]init];
vc3.title = @"vc3";
UIViewController *vc4 = [[UIViewController alloc]init];
vc4.title = @"vc4";

float statusHeight = [[UIApplication sharedApplication] statusBarFrame].size.height;
float navigationHeight = self.navigationController.navigationBar.frame.size.height;

YSLContainerViewController *containerVC = [[YSLContainerViewController alloc]initWithControllers:@[vc1,vc2,vc3,vc4]
                                                                                    topBarHeight:statusHeight + navigationHeight
                                                                            parentViewController:self];
[self.view addSubview:containerVC.view];

Property

containerVC.menuItemFont = [UIFont fontWithName:@"Futura-Medium" size:16];
containerVC.menuItemTitleColor = [UIColor whiteColor];
containerVC.menuItemSelectedTitleColor = [UIColor redColor];
containerVC.menuIndicatorColor = [UIColor yellowColor];
containerVC.menuBackGroudColor = [UIColor purpleColor];

Licence

MIT