从 Storyboard 更改按钮标题不会反映更改

Changing Button Title from Storyboard don't reflect changes

我遇到了一个奇怪的问题,即: 在 build.The 按钮从附近的其他按钮获取标题后,我的按钮标题不是我在情节提要中提到的。 我已经尝试过的是:

  1. 我已经验证 Object 两个按钮的 ID 不同。
  2. 我清理项目并重新构建。
  3. 我卸载了应用程序和模拟器,然后重试。
  4. 我重新启动 Xcode 并再次检查。
  5. 而且从代码来看,我没有更改任何按钮的标题,不会感染代码中的 ref# 或插座。

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.

此外,如果我从控制器设置标题 [self.basicInfo setTitle:@"Basic Info" forState:UIControlStateNormal];它会更改文本并解决问题。

但我的观点是为什么会这样,问题出在哪里。

我附上了图像文件,您可以在故事板中看到它显示文本 "Basic information",但在 运行 之后显示如何购买。

您的问题与您的情节提要本地化有关,因此您需要在 (StoryBoardName.string) 中搜索 Label 对象 ID,即:"YR7-n7-RFZ.text" = "testText"; 并改变等号后的值

这里有关于这个主题的教程 https://medium.com/lean-localization/ios-localization-tutorial-938231f9f881