Here's my code for a 3D touch shortcut. When I tested on iPhone 6s, the app will crash when I 3D touch and tap the shortcut.
func application(application: UIApplication, performActionForShortcutItem shortcutItem: UIApplicationShortcutItem, completionHandler: (Bool) -> Void) {
if shortcutItem.type == "com.loafer.start"{
let sb = UIStoryboard(name: "Main", bundle: nil)
let quickAction = sb.instantiateViewControllerWithIdentifier("ConfigureViewController") as! UINavigationController
window?.rootViewController?.presentViewController(quickAction, animated: true, completion: nil)
Breakpoint
}
Aucun commentaire:
Enregistrer un commentaire