I am trying to update the title of a button programmatically with an integer that has been converted to a string and having some trouble. Here is what I have…
NSString *buttonText = [NSString stringWithFormat:@"%i", clickUp];
[myButton setTitle:@"%i" forState:UIControlStateNormal, buttonText];
Doing this gives me the error of “Too many arguments to method call, expected 2 have 3”. If I set the title manually it works fine.
Can you pass a string to a button title, if so, can someone share with me how?
Thanks in advance!
In your second line of code, do this: