Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/116.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 解析自定义PFSignUpViewController未响应_Ios_Parse Platform - Fatal编程技术网

Ios 解析自定义PFSignUpViewController未响应

Ios 解析自定义PFSignUpViewController未响应,ios,parse-platform,Ios,Parse Platform,我对PFSignUpViewController进行了子类化,使其看起来与我的应用程序略有不同。我把它做成这样: 从中初始化的代码是: if (![PFUser currentUser]) { // No user logged in // Create the log in view controller CustomSignUp *logInViewController = [[CustomSignUp alloc] init]; [logI

我对PFSignUpViewController进行了子类化,使其看起来与我的应用程序略有不同。我把它做成这样:

从中初始化的代码是:

if (![PFUser currentUser]) { // No user logged in
        // Create the log in view controller
        CustomSignUp *logInViewController = [[CustomSignUp alloc] init];
        [logInViewController setDelegate:self]; // Set ourselves as the delegate

        // Create the sign up view controller
        self.signUpViewController = [[TheActualSignUp alloc] init];
        [self.signUpViewController setDelegate:self]; // Set ourselves as the delegate
        self.signUpViewController.fields = (PFSignUpFieldsUsernameAndPassword
                                   | PFSignUpFieldsSignUpButton
                                   | PFSignUpFieldsEmail
                                   | PFSignUpFieldsAdditional
                                   | PFSignUpFieldsDismissButton);
        [self.signUpViewController.signUpView.additionalField setPlaceholder:@"First & Last Name"];
            /*    UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
        [button addTarget:self
                   action:@selector(choosephoto)
         forControlEvents:UIControlEventTouchUpInside];
        [button setImage:[UIImage imageNamed:@"Camera.png"] forState:UIControlStateNormal];
        button.frame = CGRectMake(160, 320, 50, 50);
        [signUpViewController.view addSubview:button];*/
        // Assign our sign up controller to be displayed from the login controller
        [logInViewController setSignUpController:self.signUpViewController];
        logInViewController.facebookPermissions = @[ @"email", @"public_profile", @"user_friends" ];
        logInViewController.fields = (PFLogInFieldsUsernameAndPassword
                                  | PFLogInFieldsFacebook
                                  | PFLogInFieldsTwitter
                                  | PFLogInFieldsLogInButton
                                  | PFLogInFieldsSignUpButton
                                  | PFLogInFieldsPasswordForgotten);

        // Present the log in view controller

        [self presentViewController:logInViewController animated:YES completion:NULL];
    }
但是,单击“注册”或“解除”按钮不起任何作用。在将解析框架更新为1.7之前,我一直都可以很好地使用它。现在,注册中没有任何东西是正确的。我的子类视图代码如下所示:

#import "TheActualSignUp.h"


@implementation TheActualSignUp

-(void)viewDidLoad {
    self.view.backgroundColor = [UIColor blackColor];


            UIImageView *logoView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"AppIcon76x76@2x.png" ]];

            self.signUpView.logo = logoView; // logo can be any UIView

            self.fieldsBackground = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"SignUpFieldBG.png"]];

            UITextView *iprayed = [[UITextView alloc] initWithFrame:CGRectMake(0, self.view.bounds.size.width - 235, self.view.bounds.size.width, 40)];

            iprayed.text = @"iPrayed 4 U Sign Up";

            iprayed.textAlignment = NSTextAlignmentCenter;

            iprayed.textColor = [UIColor whiteColor];

            iprayed.backgroundColor = [UIColor blackColor];

            UIFont *cellFont = [UIFont fontWithName:@"Verdana-Bold" size:25];

            iprayed.font = cellFont;


            [self.signUpView addSubview:iprayed];

        //    [self.signUpView insertSubview:self.fieldsBackground atIndex:1];




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

        CALayer * l = [self.signUpView.logo layer];
        [l setMasksToBounds:YES];
        [l setCornerRadius:(self.view.bounds.size.width - 250)/2];
        [l setBorderWidth:2.0];
        [l setBorderColor:[[UIColor whiteColor] CGColor]];

        // Set frame for elements
        [self.signUpView.dismissButton setFrame:CGRectMake(10.0f, 10.0f, 87.5f, 45.5f)];
        [self.signUpView.logo setFrame:CGRectMake(125, 15, self.view.bounds.size.width - 250, self.view.bounds.size.width - 250)];

        [self.signUpView.signUpButton setFrame:CGRectMake(35.0f, self.view.bounds.size.width + 50, self.view.bounds.size.width - 70, 40.0f)];
        [self.signUpView.usernameField setFrame:CGRectMake(35.0f, self.view.bounds.size.width - 132, self.view.bounds.size.width - 70, 50.0f)];
        [self.signUpView.passwordField setFrame:CGRectMake(35.0f, self.view.bounds.size.width - 90, self.view.bounds.size.width - 70, 50.0f)];
        [self.signUpView.emailField setFrame:CGRectMake(35.0f, self.view.bounds.size.width - 48, self.view.bounds.size.width - 70, 50.0f)];
        [self.signUpView.additionalField setFrame:CGRectMake(35.0f, self.view.bounds.size.width - 6, self.view.bounds.size.width - 70, 50.0f)];
        [self.fieldsBackground setFrame:CGRectMake(35.0f, self.view.bounds.size.width - 135, self.view.bounds.size.width - 70, 174.0f)];


}

@end

如果在viewDidLayoutSubviews中执行此操作,将是一个无休止的循环,因为这些方法会更改UI并再次调用viewDidLayoutSubviews