Darin
Darin

Reputation: 29

IOS 8 issue with the UILabel?

I have a label that represents a value. When the value changes the label updates correspondingly, however when running this on my iPhone 5C running iOS 8 there is a problem.

The label updates, but my entire view controller resets - all the sprites go back to their original positions and their attributes and properties are back the way they were when the app first started.

scoreLabel.text = [NSString stringWithFormat:@"Value: %d", aValue];

I decided to run the application on the iPhone 4S simulator and then on an iOS 7 iPad and it worked just as expected.

I have tried many different methods for changing the label text and they all result in the same thing on my iOS 8 iPhone. This leads me to believe there is a problem with iOS 8.

Upvotes: 1

Views: 795

Answers (1)

Darin
Darin

Reputation: 29

I found the solution, I created my label in my storyboard but I was editing the position in my implementation file.

I solved the problem by deleting the label and re-creating it in code instead of using the storyboard, works well now.

Think it had something to do with the storyboard updating and re-arranging things due to the constraints, not sure though, if anyone else has this problem feel free to message me and I'll try my best to help.

Upvotes: 1

Related Questions