我试图在我的ios应用程序中使用密码重置进行解析,我似乎无法在swift中找到关于如何将其实现为按钮操作但没有找到任何内容的最佳方法的任何教程.
谁知道一个好看的地方?这就是我到目前为止所拥有的
@IBAction func resetPassword(sender: AnyObject) {
[PFUser requestPasswordResetForEmailInBackground:
self.loginEmail.text
block:^(BOOL succeeded, NSError *error)
{
[APP.hud hide:YES];
if (!succeeded)
{
NSString *msg = @"Could not connect. Try again later.";
[UIAlertView ok:msg];
return;
}
[UIAlertView minimalistMessageFor:3.0
title:nil
message:@"Your password has been sent to your email address."
then:^{ }];
[self begin];
}];
}
Run Code Online (Sandbox Code Playgroud)
我在PFUser线上的这个容器文字错误中得到一个Expected表达式.