iPad的tabBarController会在底部居中显示,根据不同的需求可能需要把tabBarItem均匀分布显示,具体修改如下

self.tabBar.itemPositioning = UITabBarItemPositioningCentered;

 //以下2个属性需要设置Centered样式才有作用,否则无效

        

 self.tabBar.itemSpacing = (WIDTH-tabItemWidth*self.childViewControllers.count)/(self.childViewControllers.count+1);

        

 self.tabBar.itemWidth = tabItemWidth;

相关文章:

  • 2021-09-16
  • 2021-04-16
  • 2021-05-17
  • 2021-04-08
  • 2021-11-19
  • 2021-08-05
  • 2022-12-23
  • 2021-04-18
猜你喜欢
  • 2022-12-23
  • 2021-11-24
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案