You can do this using the attributedPlaceholder
property, first create an AttributedString
, like this.
var str = "By signing up I agree to the Terms of use and Privacy policy of Rue.Du.8"
var attributedString = NSMutableAttributedString(string: str)
attributedString.addAttribute(NSForegroundColorAttributeName, value: UIColor.grayColor(), range: (str as NSString).rangeOfString(str))
attributedString.addAttribute(NSForegroundColorAttributeName, value: UIColor.whiteColor(), range: (str as NSString).rangeOfString("Terms of use"))
self.textField.attributedPlaceholder = attributedString