文章目录
  1. 1. 使用
  2. 2. 初始化
  3. 3. 定制化TabItem

RDVTabBarController是一款高度定制化的TabBarController,可以方便的对每一个TabItem进行配置。

使用

在pod中添加

1
pod 'RDVTabBarController', '~> 1.1.9'

初始化

1
2
3
4
5
6
7
8
9
10
11
12
13
UIViewController *firstViewController = [[FirstViewController alloc] init];
UIViewController *firstNavigationController = [[UINaigationController alloc] initWithRootViewController:firstViewController];

UIViewController *secondViewController = [[SecondViewController alloc] init];
UIViewController *secondNavigationViewController = [[UINaigationController alloc] initWithRootViewController:sencondViewController];

UIViewController *thirdViewController = [[ThirdViewController alloc] init];
UIViewController *thirdNavigationViewController = [[UINaigationController alloc] initWithRootViewController:thirdViewController];

RDVTabBarController *tabBarController = [[EDVTabBarController alloc] init];
[tabBarController setViewControllers:@[firstNavigationController,secondNavigationViewController,thirdNavigationViewController]];

self.viewController = tabBarController;

定制化TabItem

1
2
3
UIImage *finishedImage = [UIImage imageNamed:@"selected_background"];
UIImage *unfinishedImage = [UIImage imageNamed:@"normal_background"];
[[tabBarController tabBar] items];
文章目录
  1. 1. 使用
  2. 2. 初始化
  3. 3. 定制化TabItem