Last active
February 24, 2018 22:27
-
-
Save ArEnSc/6218305d8355d71e1daf224c4794249a to your computer and use it in GitHub Desktop.
login.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//: Playground - noun: a place where people can play | |
import UIKit | |
class ListViewController: UIViewController, UITextFieldDelegate { | |
let logo:UIImage = UIImage() | |
let username:UITextField = UITextField() | |
let password:UITextField = UITextField() | |
let submitButton:UIButton = UIButton() | |
override func viewDidLoad() { | |
username.placeholder = "User Name" | |
username.borderStyle = .bezel | |
password.placeholder = "Password" | |
password.borderStyle = .roundedRect | |
submitButton.addTarget(self, action: #selector(submitButton), for: .touchUpInside) | |
submitButton.layer.backgroundColor = .red | |
} | |
func submitPressed() { | |
} | |
} | |
// vs | |
import UIKit | |
class ListViewController: UIViewController, UITextFieldDelegate { | |
let logo:UIImage = UIImage() | |
let username:UITextField = UITextField() | |
let password:UITextField = UITextField() | |
let submitButton:UIButton = UIButton() | |
override func viewDidLoad() { | |
username.placeholder = "User Name" | |
username.borderStyle = .bezel | |
password.placeholder = "Password" | |
password.borderStyle = .roundedRect | |
submitButton.addTarget(self, action: #selector(submitButton), for: .touchUpInside) | |
submitButton.layer.backgroundColor = .red | |
} | |
func submitPressed() { | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment