Search code examples
iosxcodeuitextfieldfont-sizeuistepper

Edit UITextField Font Size with UIStepper


Is there a way to edit a UITextField's font size with a UIStepper? i.e, tap the add button and the UITextField's font size increases by 1 or 5? So far I have tried [textField adjustsFontSizeToFitWidth:value]; with no luck. How could I do this? Also, if I can't control the font size with a UIStepper, how else can I edit the font size? Thanks


Solution

  • I think you should be using:

    [textField setFont:[UIFont systemFontOfSize:value]];