alert.addAction(UIAlertAction(title: "Clear", style: .destructive) { [weak self] _ in self?.text = "" })
In your storyboard or code, change the class of your UITextField to ShakeableTextField .
: Official course materials and homework repositories are often hosted on the Purdue-CS193 GitHub organization. 2. CS 193P at Stanford University (iOS Development)