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
。有同樣問題或有解決方案的任何人?