objective c - How to translate this objc block to Swift closure? -


objective-c:

    [bmobuser signorlogininbackgroundwithmobilephonenumber:mobilephonenumber andsmscode:smscode block:^(bmobuser *user, nserror *error) {         .........      }]; 

and wrote in swift:

    bmobuser.signorlogininbackgroundwithmobilephonenumber(phonenumber, andsmscode: smscode, block: {(_user: bmobuser, error: nserror) -> () in         ........     }) 

but compiler warning saying "cannot invoke ... argument list of type ..."

so correct syntax of closure in swift? thanks


Comments

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -