ios - Parse Login Using Swift -


I am making a login page for my iOS app using swift and parse. In my initial view controller, I have

  var user = PFUser.currentUser () if user! = Nil {println (user) self.dismissViewControllerAnimated (1, completion: zero)} other {println} ("no user is logged in") Login: PFLogInViewController = PFLogInViewController () login.fields = PFLogInFields.UsernameAndPassword | PFLogInFields.LogInButton | View my viewDidLoad method of ViewController I want to go after login. The login screen is initially visible, and then I can type my information, but if I enter the correct login information it does not go anywhere, since that time restarting the app gives me permission to log in . I want to be able to log in to the app without restarting, but how does it know.   

You just have to implement

  - (zero) log invent Controller: (PFLog Invuentrator *) Log In Controller Logged User: (PFUser *) User {[Self-Captive View Controller Permission: Yes Completed: Zero]; }   

which is called when logging in to PFUser.

And in Swift

  func logInViewController (loginInController: PFLogInViewController !,) DidLogInUser User: PFUser!) - & gt; Zero {self.dismissViewControllerAnimated (true, absolute: zero)}    

Comments

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

.net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -