自定义TabBar的案例网上不少,昨天受到开发小伙伴的影响,尝试了一下非大神的取巧思路:Demo

1、创建RootViewController,后面创建几个继承的VC,将这几个VC添加到TabBarController中

2、添加Window.RootVC = UITabBarC

3、在RootViewController中隐藏原TabBar,以创建UIView代替TabBar位置的视图

4、在UIview上添加Button(至于布局样式根据需求来吧),响应事件就是self.tabBarController.selectedIndex = button.tag

 iOS 轻松实现自定义TabBar

相关文章:

  • 2022-12-23
  • 2021-06-11
  • 2021-10-19
  • 2021-07-27
  • 2022-03-08
  • 2022-02-06
  • 2022-12-23
  • 2021-09-02
猜你喜欢
  • 2021-09-28
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-19
相关资源
相似解决方案