我的根视图是一个标签栏控制器,我想在收到特定通知时在特定标签上打开应用程序。如果我使用presentViewController,则标签栏消失。有没有特定的方法可以做到这一点?
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
let myTabBar = self.window.rootViewController as! UITabBarController // Getting Tab Bar
myTabBar.selectedIndex = 2 //Selecting tab here
return true
}
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句