I have some UILabel
objects in my app, and I change their value when a button is pressed. It works fine in the simulator and on old iPhones, but If I try it on an iPhone 4, the previous text of the label doesn't disappear, it shows behind the the new text (well, sometimes it disappears and only the correct text appears, but most of the times it doesn't work right).
This is the code (it's a method that only does that, lehenPantalla
is a UIViewController
, and the variables used to set the text are ints passed as parameters):
self.lehenPantalla.firstPlayerSet.text = [NSString stringWithFormat:@"%d",localFirstPlayerSet];
self.lehenPantalla.secondPlayerSet.text = [NSString stringWithFormat:@"%d",localSecondPlayerSet];
self.lehenPantalla.firstPlayerGames.text = [NSString stringWithFormat:@"%d",localFirstPlayerGames];
self.lehenPantalla.secondPlayerGames.text = [NSString stringWithFormat:@"%d",localSecondPlayerGames];
Is this a common error? I don't know if this happens because the phone is an iPhone 4 or because it's using iOS 5.1 (the other phone is running iOS 4).