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

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

Kivy: Swiping (Carousel & ScreenManager) -