我是新來解析。我正在使用ios SDK進行應用程序嘗試實現登錄和註冊。我下載了最新版本(1.2.21)。我正在使用PFSignUpViewController來實現註冊。我嘗試了繼承控制器來定製它,但我看到了一些問題。首先,我似乎無法更改字段佔位符名稱的用戶名或密碼。密碼字段甚至不顯示佔位符;它是空的。其次,我無法打開附加領域。儘管有定製代碼,沒有額外的字段顯示。有誰知道什麼可能導致這種情況?或者它可能是分析框架中的錯誤? - 下面是我的PFSignUpViewController的子類。解析ios sdk默認註冊不起作用
#import "QSignUpViewController.h"
@interface QSignUpViewController()
@end
@implementation QSignUpViewController
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self) {
// Custom initialization
}
return self;
}
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view.
self.fields = PFSignUpFieldsUsernameAndPassword |
PFSignUpFieldsSignUpButton | PFSignUpFieldsAdditional;
self.signUpView.usernameField.placeholder = @"Email";
self.signUpView.passwordField.placeholder = @"Password";
[self.signUpView.additionalField setPlaceholder:@"Phone Number"];
[self setEmailAsUsername: YES];
//self.signUpView.emailAsUsername = YES;
}