草庐IT

selectedTabBarItemIndex

全部标签

ios - 以编程方式选择选项卡自定义选项卡栏ios

我使用了以下tutorial在ios中实现自定义选项卡当我点击任何项目时它工作正常。现在我想以编程方式移动它。例如我收到了Firebase的通知,想打开第三个选项卡。但是我没有得到。我在appdelegate中引用了MainTabbarController实例。这是我试过的在CustomTabBarfunccustomTapped(index:Int){animateTabBarSelection(from:selectedTabBarItemIndex,to:index)selectedTabBarItemIndex=indexdelegate.didSelectViewContro