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

php - How to add and update images or image url in Volusion using Volusion API -

c# SetCompatibleTextRenderingDefault must be called before the first -

Laravel mail error `Swift_TransportException in StreamBuffer.php line 269: Connection could not be established with host smtp.gmail.com [ #0]` -