Paru Birds collection in All colours

1 year ago
5

//
// LoginViewController.swift
// Parse Demo
//
// Created by Wesley Espinoza on 1/7/19.
// Copyright © 2019 HazeStudio. All rights reserved.
//

import UIKit
import Parse

class LoginViewController: UIViewController {
@IBOutlet weak var usernameField: UITextField!
@IBOutlet weak var passwordField: UITextField!

override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
}

@IBAction func onSignIn(_ sender: Any) {
let username = usernameField.text ?? ""
let password = passwordField.text ?? ""

PFUser.logInWithUsername(inBackground: username, password: password) { (user, error) in
if let error = error {
print("User log in failed: \(error.localizedDescription)")
} else {
print("User logged in successfully")
// display view controller that needs to shown after

Loading comments...