How to make a image disappear if the score is high enough!
Hey! I am trying to make a app, when you get your score high enough a UIImageView will disappear. Would it go along the lines of: if score = 1000 UIImage remove? Something like that?
Thanks Brandon
Hey! I am trying to make a app, when you get your score high enough a UIImageView will disappear. Would it go along the lines of: if score = 1000 UIImage remove? Something like that?
Thanks Brandon
so you have an int, that represent the score. you have an imageview.
The error message implies that Score is actually a pointer and not a number. You are going to have to post some code or we have no idea how to help you. We probably at least need to see where you are declaring Score and how you are using it.
The error message implies that Score is actually a pointer and not a number. You are going to have to post some code or we have no idea how to help you. We probably at least need to see where you are declaring Score and how you are using it.
ok! thanks for responding. And here is the code that is declaring the score: score += (int)differance;
NSString *nssScore = [NSString stringWithFormat:@"Score:%i", score];
Score.text = nssScore;
"score" is your int, you are trying to check if your string "Score" > 1000 which is probably causing your crash
O WOW!!!! it works thanks so much! Now the problem is that when the score hits 1000 it goes away, but when you touch it, it still effects the player? Is there any code where i can make it completely delete it self and stop rendering all of its code?
O WOW!!!! it works thanks so much! Now the problem is that when the score hits 1000 it goes away, but when you touch it, it still effects the player? Is there any code where i can make it completely delete it self and stop rendering all of its code?
[myimage removeFromSuperview];
That will remove it from the view not just hide it. You may want to release it after.