项目简介
LLRiseTabBar-iOS
仿淘宝闲鱼的TabBar (Objective-C 实现)
0x00 为什么做这个
从我由 Android 转 iOS 开发之后,曾接过一个项目,论文,底部的 TabBar 就是设计成中间一个按钮凸起的样子的,平时玩的 App 不多,这样的设计也就在 Instagram 上看到过,但是那时候上网找资源也没找到比较好的 (也有可能是我没找到),所以那时候就没有做得很好,到后来,突然看到了一些 App 更新之后变成了中间一个按钮凸起的样子,想起了之前想要仿着咸鱼的 TabBar,但是一直没有动手去做,开题报告,所以现在就动手开始做了。
官方 App 截图:
项目截图:
PNG:
GIF:
Usage
UITabBarController *tabBarController = [[UITabBarController alloc] init];
tabBarController.viewControllers = @[...];
LLTabBar *tabBar = [[LLTabBar alloc] initWithFrame:tabBarController.tabBar.bounds];
tabBar.tabBarItemAttributes = @[@{kLLTabBarItemAttributeTitle : @"首页", kLLTabBarItemAttributeNormalImageName : @"home_normal", kLLTabBarItemAttributeSelectedImageName : @"home_highlight", kLLTabBarItemAttributeType : @(LLTabBarItemNormal)},
tabBar.delegate = self;
[tabBarController.tabBar addSubview:tabBar];
github地址:https://github.com/NoCodeNoWife/LLRiseTabBar-iOS