我正在嘗試解析和Swift。 我想在登錄成功後隱藏登錄視圖。用swift登錄解析框架
我在方法logInViewController(logInController: PFLogInViewController!, didLogInUser user: PFUser!)
中使用了dismissViewControllerAnimated,但它無法顯示下一個viewController。
OS:MacOSX的10.9.4 的Xcode 6.1β2
class LoginViewController: UIViewController,
PFLogInViewControllerDelegate,
PFSignUpViewControllerDelegate {
override func viewDidAppear(animated: Bool) {
//Create Login
var loginViewController:PFLogInViewController = PFLogInViewController()
loginViewController.fields = PFLogInFieldsDefault
presentViewController(loginViewController, animated: true, completion: nil)
loginViewController.delegate = self
loginViewController.signUpController.delegate = self
}
override func viewDidLoad() {
super.viewDidLoad()
}
func logInViewController(logInController: PFLogInViewController!,
didLogInUser user: PFUser!)
{
logInController.dismissViewControllerAnimated(true, completion: nil)
//var nextViewController:RegisterViewController = RegisterViewController()
//presentViewController(nextViewController, animated: true, completion: nil)
}
}
如何隱藏loginViewController和顯示下一個視圖控制器?
你試過self.dismissViewControllerAnimated(true,completion:nil)嗎? – Andrew 2014-10-07 13:31:33
self.dissmissViewControllerAnimated(true,completion:nil)不起作用。 LoginViewController仍然顯示。 – tajihiro 2014-10-07 13:41:58
可能重複[在Facebook登錄後將問題推送到PFQueryTableViewController](http://stackoverflow.com/questions/15102770/trouble-pushing-to-pfquerytableviewcontroller-after-facebook-login) – 2014-10-07 13:47:15