使用 Swift 构建的自定义标签栏

自定义标签栏

感谢Riccardo Cipolleschi的精彩教程。

选项卡栏是使用 的子父概念创建的。
添加了三个基本功能,
ViewController

  • switchTab(_)
  • hideTabBar()
  • showTabBar()

隐藏和显示是通过上下滑动动画完成的。
Assin Your to 的数组。
在 中
设计所需的单元格 由于基本组件是 ,请根据自己的喜好随意进行连接。
ViewControllersTabBarController[viewControllers]TabBarCellUICollectionView

GitHub

点击跳转