uiapplication - How to call completionHandler for performFetchWithCompletionHandler in Swift -



uiapplication - How to call completionHandler for performFetchWithCompletionHandler in Swift -

how can phone call completion handler background fetch in swift. following:

func application(application: uiapplication, performfetchwithcompletionhandler completionhandler: (uibackgroundfetchresult) -> void) { // completionhandler (uibackgroundfetchresultnodata) // not work :( homecoming }

can please help me? thanks,

tobi

the enum case uibackgroundfetchresult.nodata, right way is:

completionhandler (uibackgroundfetchresult.nodata)

or even:

completionhandler (.nodata)

because type can inferred closure signature

hint: when unsure function signature, or enum cases, etc., in xcode write type, in case uibackgroundfetchresult, , cmd+click go definition, or option+click popup declaration. helps lot.

swift uiapplication

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -