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

How to get the arclen between two curve points in Maya? -

git svn - Unignore directories in git-svn (adding directories to a sparse checkout) -

C++ Linked List -