Skip to content

Instantly share code, notes, and snippets.

@Ksen17
Created September 1, 2020 11:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Ksen17/f0adfb532aaed4b3420538b491391ef5 to your computer and use it in GitHub Desktop.
Save Ksen17/f0adfb532aaed4b3420538b491391ef5 to your computer and use it in GitHub Desktop.
import UIKit
extension UITextField {
func placeholder() -> UILabel? {
for subview in $0.subviews {
if let label = subview as? UILabel {
return label
}
}
return nil
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment