【发布时间】:2017-02-01 11:47:02
【问题描述】:
所以我刚刚在我的应用程序中添加了 3d 快捷方式。现在他们打开了正确的ViewController,但我无法浏览应用程序的其余部分。它似乎将ViewController 作为modal 打开。如何让导航栏也显示?
这里的代码是AppDelegate.swift:
func application(_ application: UIApplication, performActionFor shortcutItem: UIApplicationShortcutItem, completionHandler: @escaping (Bool) -> Void) {
if shortcutItem.type == "Micheal-Smith.Pathfinder-Society.charLog"
{
let sb = UIStoryboard(name: "Main", bundle: nil)
let charLog = sb.instantiateViewController(withIdentifier: "CharacterLog") as! CharactersTableViewController
let root = UIApplication.shared.keyWindow?.rootViewController
root?.present(charLog, animated: false, completion: {
completionHandler(true)
})
}
else if shortcutItem.type == "Micheal-Smith.Pathfinder-Society.gmTools"
{
let sb = UIStoryboard(name: "Main", bundle: nil)
let charLog = sb.instantiateViewController(withIdentifier: "gmTools") as! UITabBarController
let root = UIApplication.shared.keyWindow?.rootViewController
root?.present(charLog, animated: false, completion: {
completionHandler(true)
})
}
}
【问题讨论】:
标签: ios swift uinavigationbar shortcut 3dtouch