Skip to content

Instantly share code, notes, and snippets.

View timqzm's full-sized avatar
👨‍💻
Happy coding

Tim Kuzmin timqzm

👨‍💻
Happy coding
View GitHub Profile
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
var activeTextField: UITextField?
@IBAction func logIn(_ sender: Any) {
// ...
HUD.flash(.labeledError(title: "blabla", subtitle: "blablalba"),
onView: activeTextField?.inputAccessoryView,
delay: 1.0)
// ...
}