am trying to display a variable in a label. I don't know how to do it in the SDK though. I know that the normal way to display a variable (in command line Objective-C) is,
So I tried something like that with the SDK knowledge I have and came up with variations of,
But it comes back with an error of too many arguments for setText. How do I make it show that variable in the label?
I am able to get the button to display words using,
So I know know that my button works.
Code:
printf("%i",variable);
So I tried something like that with the SDK knowledge I have and came up with variations of,
Code:
(IBAction)action {
variable == 3;
[label setText:@"%i",variable];
}
But it comes back with an error of too many arguments for setText. How do I make it show that variable in the label?
I am able to get the button to display words using,
Code:
[label setText:@"Words"];
So I know know that my button works.