Created
September 1, 2020 11:55
-
-
Save Ksen17/f0adfb532aaed4b3420538b491391ef5 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
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