Skip to content

Instantly share code, notes, and snippets.

@bobleesj
Created January 18, 2017 12:13
Show Gist options
  • Save bobleesj/a0b37a52f2e91acc63d43e3b93d59a36 to your computer and use it in GitHub Desktop.
Save bobleesj/a0b37a52f2e91acc63d43e3b93d59a36 to your computer and use it in GitHub Desktop.
class BuzzableTextField: UITextField, Buzzable {}
class BuzzableButton: UIButton, Buzzable {}
class BuzzableImageView: UIImageView, Buzzable {}
class BuzzablePoppableLabel: UILabel, Buzzable, Poppable {}
class LoginViewController: UIViewController {
@IBOutlet weak var passcodTextField: BuzzableTextField!
@IBOutlet weak var loginButton: BuzzableButton!
@IBOutlet weak var errorMessageLabel: BuzzablePoppableLabel!
@IBOutlet weak var profileImageView: BuzzableImageView!
@IBAction func didTabLoginButton(_ sender: UIButton) {
passcodTextField.buzz()
loginButton.buzz()
errorMessageLabel.buzz()
errorMessageLabel.pop()
profileImageView.buzz()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment