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
Post a Comment