Intsab Haider
Intsab Haider

Reputation: 3571

Changing Button Title from Storyboard don't reflect changes

I am facing a weird problem i.e: My Button title is not what i mentioned in storyboard after build.The Button is getting title from other button near to it. What i tried already is:

  1. I have verified that Object ID of both button are different.
  2. I clean the project and built again.
  3. I Uninstalled the app and from simulator and tried again.
  4. I restarted the Xcode and checked again.
  5. And Also from code i am not changing title of any button infect no ref# or outlet in code.

If i remove the title from storyboard and Run it reflect the change and show empty title there! that is Normal behaviour, But when i put any other title it show nearest element title not own.

Also if i set title from Controller [self.basicInfo setTitle:@"Basic Info" forState:UIControlStateNormal];it change the text and solves the issue.

But My Point is why it is behaving like this and where is the problem.

I have Attached the image file where you can see that in storyboard it show text "Basic information" but after running it shows HOW TO BUY.

enter image description here

Upvotes: 4

Views: 940

Answers (1)

Reinier Melian
Reinier Melian

Reputation: 20804

Your problem is related to the fact that you have your storyboard localized, so you need to search in your (StoryBoardName.string) the Label object id ie: "YR7-n7-RFZ.text" = "testText"; and change the value after equal sign

enter image description here

here you have an tutorial about this topic https://medium.com/lean-localization/ios-localization-tutorial-938231f9f881

Upvotes: 3

Related Questions