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
import UIKit | |
import PlaygroundSupport | |
let containerView = UIView(frame: CGRect(x: 0.0, y: 0.0, width: 375.0, height: 667.0)) | |
PlaygroundPage.current.liveView = containerView | |
let circle = UIView(frame: CGRect(x: 0.0, y: 0.0, width: 50.0, height: 50.0)) | |
circle.center = containerView.center | |
circle.layer.cornerRadius = 25.0 |
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
var activeTextField: UITextField? | |
@IBAction func logIn(_ sender: Any) { | |
// ... | |
HUD.flash(.labeledError(title: "blabla", subtitle: "blablalba"), | |
onView: activeTextField?.inputAccessoryView, | |
delay: 1.0) | |
// ... | |
} |