如何在swift中編寫此塊函數?我已經讀過這個主題,但是這個語法對我來說並不合理。在Swift中寫入塊函數
MyAppRequest *request = [_agent login];
[request sendWithLoadMessage:@"Signing In"
successMessage:@"Signed In"
failureMessage:@"Failed to log in"
recoveryOptions:@"If you keep having trouble, try going to http://mystrou.firehosehelp.com and try loggin in there. If that fails, try resetting your password"
success:^(MyAppResponse *response) {
PREFS.authToken = _agent.accessToken;
[_delegate loginViewController:self loggedInAgent:_agent];
} failure:^(MyAppResponse *response) {
}];
請張貼更多的代碼 - 有呼叫丟失的部分。 – fluidsonic 2014-10-01 04:39:28
確定我已經相應更新 – YichenBman 2014-10-01 04:42:41