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

javascript - THREE.js reposition vertices for RingGeometry -

javascript - I need to update the text of a paragraph by inline edit -

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