Worked on UI is interesting part of iOS development

extension UITextField {
    func setPlaceholderColor(color: UIColor) {
        if let placeholder = placeholder {
            attributedPlaceholder = NSAttributedString(string: placeholder, attributes: [NSForegroundColorAttributeName: color])
        }
    }
}

Way to use:

let textField = UITextField()
textField.setPlaceholderColor(.redColor())

Letโ€™s try, itโ€™s delicious! ๐ŸŒฏ๐ŸŒฎ๐Ÿ—๐Ÿœ