I have 10 images named 0.png to 9.png and also a randomiser give me a random number between these 10.
And well depending on the number the randomiser gives me, I want to set my UIImageView with that image.
My idea was to do it like this:
[image setImage:[UIImage imageNamed: @"%d.jpg", currentQuestion]];
As this works fine when I'm setting the text of a NSLog with the random number like this:
NSLog(@"Some Text %d", currentQuestion);
However when I try to set the image I get this error:
Too many arguments to method call, excepted 1, have 2
Aucun commentaire:
Enregistrer un commentaire