I used the following code for setting different font for UITextfield's text(16) and placeholder(9),
m_searchTextField.font = UIFont .systemFontOfSize(16)
let font = UIFont .systemFontOfSize(9)
let attributes = [
NSForegroundColorAttributeName: UIColor.lightGrayColor(),
NSFontAttributeName : font]
m_searchTextField.attributedPlaceholder = NSAttributedString(string: "Search String be in meddle left",
attributes:attributes)
Font size is set correctly, but the placeholder text sets somewhat upper in the textfield.
How can I fix this issue? Any Suggestions?