ios - Completion handler is not called -


pardon me beginner's question, have function completion handler, it's not called when function complete. tip? thanks

    func updatedailylength(completion: ()-> void ) {           //do here     } 

and in caller:

updatedailylength(completion: { getmonthlydistance() }) 

the function getmonthlydistance() never called.

you need call updatedailylength

func updatedailylength(completion: ()-> void ) {       completion() } 

Comments

Popular posts from this blog

c# SetCompatibleTextRenderingDefault must be called before the first -

C#.NET Oracle.ManagedDataAccess ConfigSchema.xsd -

c++ - Fill runtime data at compile time with templates -