【发布时间】:2017-07-07 05:39:30
【问题描述】:
我已经使用下面的tutorial在ios中实现自定义标签
当我点击任何项目时,它工作正常。现在我想以编程方式移动它。例如我收到了 Firebase 的通知表,想打开第三个标签。但我越来越零了。我在appdelegate 中引用了MainTabbarController 实例。
这是我尝试过的
在CustomTabBar
func customTapped(index :Int){
animateTabBarSelection(from: selectedTabBarItemIndex, to: index)
selectedTabBarItemIndex = index
delegate.didSelectViewController(self, atIndex: index)
}
在AppDelegate
mainTabBarController?.customTabBar?.customTapped( index: 2)
【问题讨论】:
标签: ios swift3 custom-controls