目标-C:
[BmobUser signOrLoginInbackgroundWithMobilePhoneNumber:mobilePhoneNumber andSMSCode:smsCode block:^(BmobUser *user, NSError *error) {
.........
}];
我在Swift中写道:
BmobUser.signOrLoginInbackgroundWithMobilePhoneNumber(phoneNumber, andSMSCode: smsCode, block: {(_user: BmobUser, error: NSError) -> () in
........
})
但是我得到编译器警告说"无法使用类型的参数列表调用..."
那么在swift中这样的闭包的正确语法是什么?感谢