how to change placeholder color in swift ios
Copy and paste this extension on you project an access this
extension UITextField
{
func setPlaceholder(_ color:UIColor)
{
self.attributedPlaceholder = NSAttributedString(string: self.placeholder ?? "", attributes: [NSAttributedString.Key.foregroundColor: color])
}
}
Used this like
txtYouTextFiledName.setPlaceholder(UIColor.red)
This is very help full of iOS 13 crash
ReplyDeleteThank Harsh
Thank harsh Gohil for this important things
ReplyDeletemy all apps are crash because of this
Thanks agent