2016-09-07 78 views

回答

0

更新到Xcode 8 beta 8解決了這個問題。

編輯1:

更改行:

func application(_ application: UIApplication, performActionFor shortcutItem: UIApplicationShortcutItem, completionHandler: (Bool) -> Void) { 
    let handledShortCutItem = handleShortCutItem(shortcutItem) 

    completionHandler(handledShortCutItem) 
} 

到:

func application(_ application: UIApplication, performActionFor shortcutItem: UIApplicationShortcutItem, completionHandler: @escaping (Bool) -> Void) { 
    let handledShortCutItem = handleShortCutItem(shortcutItem) 

    completionHandler(handledShortCutItem) 
} 

(添加了@escaping