Hello,
Im trying to cast an int into a string so that I can output the value to the text property of a label - the code below generates a random number and assigns the value to the variable "generated" I then want to take this value convert it to a string and assign it the text of the label.
Does anyone know how to do this?
- (IBAction)clearText {
int generated;
generated = (random() % 100) + 1;
mainText.text = generated;
}
Im trying to cast an int into a string so that I can output the value to the text property of a label - the code below generates a random number and assigns the value to the variable "generated" I then want to take this value convert it to a string and assign it the text of the label.
Does anyone know how to do this?
- (IBAction)clearText {
int generated;
generated = (random() % 100) + 1;
mainText.text = generated;
}