Edit UITextField Font Size with UIStepper
-
21-06-2021 - |
Question
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]];
OTHER TIPS
UIFont *textFont = [UIFont fontWithName:@"Helvetica-Bold" size:8.0];
[textField setFont:textFont];
Try This...
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow