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

assembly - What is the addressing mode for ld, add, and rjmp instructions? -

vowpalwabbit - Interpreting Vowpal Wabbit results: Why are some lines appended by "h"? -

ubuntu - Bash Script to Check That Files Are Being Created -