如何自定义PF SignUp ViewController的外观

时间:2014-12-30 20:14:28

标签: swift parse-platform

如果您正在使用PFLogInViewController并启用了PFLogInFieldsSignUpButton选项,那么如何自定义PFSignUpViewController的外观?

1 个答案:

答案 0 :(得分:1)

您需要继承PFSignUpViewController,并在viewDidLoadviewDidLayoutSubviews中执行布局自定义。

class SpuggySignUpViewController: PFSignUpViewController {
  override func viewDidLoad() {
    super.viewDidLoad()
    // Customisation here
  }

  override func viewDidLayoutSubviews() {
    super.viewDidLayoutSubviews()
    // More customisation here
  }

}

要获取PFSignUpViewController提供的PFLoginViewController自定义版本,只需将其实例化,然后在PFLoginViewController中进行设置。

let loginController = PFLoginViewController()
let customSignupController = SpuggySignUpViewController()
loginController.signUpController = customSignupController
// Now show your login Controller