I`m using this code in AppDelegate
for make a shortcut when you long press the app before its launch.
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)
})
}
}
When i open the shortcut, the viewController
is full screen,no NavigationController
or TabBarController
. Anyone with this same issue or have a solution?