0
我在使用此代码的AppDelegate
中创建一个快捷方式,当您在应用程序启动前长按此按钮。导航/ TabBarController消失
func application(application: UIApplication, performActionForShortcutItem shortcutItem: UIApplicationShortcutItem, completionHandler: (Bool) -> Void) {
if(shortcutItem.type == "com.skalstad.addStuff")
{
let sb = UIStoryboard(name: "Main", bundle: nil)
let add = sb.instantiateViewControllerWithIdentifier("AddTableViewController") as! AddTableViewController
let root = UIApplication.sharedApplication().keyWindow?.rootViewController
root?.presentViewController(add, animated: false, completion: {() -> Void in
completionHandler(true)
})
}
}
当我打开捷径,viewController
是全屏,无NavigationController
或TabBarController
。有同样问题或有解决方案的任何人?