Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/luobin23628/tktabbarcontroller
可以自定义普通和按下图片,选中效果的自定义TabbarController
https://github.com/luobin23628/tktabbarcontroller
Last synced: 8 days ago
JSON representation
可以自定义普通和按下图片,选中效果的自定义TabbarController
- Host: GitHub
- URL: https://github.com/luobin23628/tktabbarcontroller
- Owner: luobin23628
- Created: 2013-01-06T07:11:21.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2013-01-07T11:13:31.000Z (about 12 years ago)
- Last Synced: 2024-11-08T00:16:03.237Z (2 months ago)
- Language: Objective-C
- Size: 139 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
TKTabBarController
==================可以自定义普通和按下图片,选中效果的自定义TabbarController, 支持ios4.3以上。
使用方法:
NSMutableArray *viewControllers = [NSMutableArray array];
TKFirstViewController *firstViewController = [[TKFirstViewController alloc] init];
firstViewController.tabBarItem = [[[TKTabBarItem alloc] initWithTitle:@"First" unselectedImage:[UIImage imageNamed:@"bottom_tabbar1_n.png"] selectedImage:[UIImage imageNamed:@"bottom_tabbar1_p.png"] tag:0] autorelease];
[viewControllers addObject:firstViewController];
[firstViewController release];
TKSecondViewController *secondViewController = [[TKSecondViewController alloc] init];
secondViewController.tabBarItem = [[[TKTabBarItem alloc] initWithTitle:@"Second" unselectedImage:[UIImage imageNamed:@"bottom_tabbar2_n.png"] selectedImage:[UIImage imageNamed:@"bottom_tabbar2_p.png"] tag:1] autorelease];
[viewControllers addObject:secondViewController];
[secondViewController release];
TKThirdViewController *thirdViewController = [[TKThirdViewController alloc] init];
thirdViewController.tabBarItem = [[[TKTabBarItem alloc] initWithTitle:@"Third" unselectedImage:[UIImage imageNamed:@"bottom_tabbar3_n.png"] selectedImage:[UIImage imageNamed:@"bottom_tabbar3_p.png"] tag:2] autorelease];
[viewControllers addObject:thirdViewController];
[thirdViewController release];
TKTabBarController *tabBarController = [[TKTabBarController alloc] init];
tabBarController.tabBar.tkBackgroundImage = [UIImage imageNamed:@"tabbar-bg.png"];
tabBarController.tabBar.tkSelectionIndicatorImage = [[UIImage imageNamed:@"tabbar-button-bg-selected.png"] stretchableImageWithLeftCapWidth:1 topCapHeight:1];
tabBarController.viewControllers = viewControllers;