Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/112.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 在登录验证之前无法更改用户名值_Ios_Xcode5_Parse Platform_Pfloginviewcontroller_Pfuser - Fatal编程技术网

Ios 在登录验证之前无法更改用户名值

Ios 在登录验证之前无法更改用户名值,ios,xcode5,parse-platform,pfloginviewcontroller,pfuser,Ios,Xcode5,Parse Platform,Pfloginviewcontroller,Pfuser,在登录过程中,在使用委托函数开始登录之前,我将在何处放置设置用户名的代码 - (BOOL)logInViewController:(PFLogInViewController *)logInController shouldBeginLogInWithUsername:(NSString *)username password:(NSString *)password 我的想法是,我需要我的b2b应用程序的唯一用户名;这适用于不同的公司,这些公司可

在登录过程中,在使用委托函数开始登录之前,我将在何处放置设置用户名的代码

 - (BOOL)logInViewController:(PFLogInViewController *)logInController 
shouldBeginLogInWithUsername:(NSString *)username 
                    password:(NSString *)password
我的想法是,我需要我的b2b应用程序的唯一用户名;这适用于不同的公司,这些公司可能有相同的用户名。从上面,我将pfuser中的用户名设置为“company id”+“”+“user id”,因此我尝试在PFLogInViewController上按用户设置输入的用户名以进行登录验证

我创建了PFLogInViewController的自定义子类:

#import "PFLogInViewControllerFSB.h"

@interface PFLogInViewControllerFSB ()

@end

@implementation PFLogInViewControllerFSB

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}

- (void)viewDidLoad
{
    [super viewDidLoad];

    UIColor *color = [UIColor lightGrayColor];
    self.logInView.usernameField.attributedPlaceholder = [[NSAttributedString alloc] initWithString:NSLocalizedStringFromTable(@"login_txt_user", @"Generales",nil) attributes:@{NSForegroundColorAttributeName: color}];
    self.logInView.passwordField.attributedPlaceholder = [[NSAttributedString alloc] initWithString:NSLocalizedStringFromTable(@"login_txt_password", @"Generales",nil) attributes:@{NSForegroundColorAttributeName: color}];
    self.logInView.logo = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 200, 50)];
    UILabel *labelLogo = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 200, 50)];
    labelLogo.text = @"Catch Sales";
    [labelLogo setTextAlignment:NSTextAlignmentCenter];
    [labelLogo setTextColor:[UIColor lightGrayColor]];
    [labelLogo setFont:[UIFont fontWithName:@"Helvetica" size:30]];
    [self.logInView.logo addSubview:labelLogo];
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
}

@end

为什么不在注册时更改用户名?我如何更改它?与之前一样,获取用户输入的信息并将其附加到公司id中。