这个库用于为 iOS 标签栏项目添加动画效果,它继承自 UITabBarController。
只需将 Sources 文件夹添加到您的项目中。
或者使用 CocoaPods 和 Podfile
pod 'CardTabBar'
import CardTabBar
class TabBarController: CardTabBarController {
override func viewDidLoad() {
super.viewDidLoad()
setupViewController()
setupUI()
}
func setupUI() {
tabBar.tintColor = .TabBar.title
tabBar.backgroundColor = .background
tabBar.barTintColor = .Navigation.background
tabBar.indicatorColor = .TabBar.itemBackground
}
func setupViewController() {
viewControllers = [UIViewController(), UIViewController()]
}
}
该库在 MIT 许可证的条款下以开源形式提供。