UITextField make text bold?

Viewed 29473

Quick question, does anyone know how to programatically make the text in the textField bold or italic?

   @property(nonatomic, retain) IBOutlet UITextField *textField_TOP_01;

   [textField_TOP_01 setTextColor:[UIColor redColor]];
   [textField_TOP_01 setText:@"This text is bold"];

Much appreciated

Gary

5 Answers

In swift 3.0 Suppose your UITextField variable name is textField.

textField.font = UIFont(name: "HelveticaNeue-Medium", size: 17)// for medium

name: "HelveticaNeue-Bold" // for bold
Related