The label “Cancel” from modal segue in Apple Watch showing wrong text - “abbrechen”

南笙酒味 提交于 2019-12-04 04:19:30

Check if you are overriding the language settings when installing over Xcode. This can be done using the scheme editor in Xcode:

  • Click the target in the Run destination menu and choose Edit Scheme.
  • On the right, select Options.
  • Check Application Language setting

More information on Testing Specific Languages and Regions (@developer.apple.com)

I am a bit confused by you code? You are giving it the title 'direct' but expecting a title of 'Cancel'?

Should you not be doing:

    self.clearAllMenuItems()
    self.addMenuItem(withImageNamed: "imageFileForDirectButton", title: "Direct", action: #selector(TheController.menuDirectButtonPressedFunction))
    self.addMenuItem(with: WKMenuItemIcon.decline, title: "Cancel", action: #selector(TheController.menuCancelButtonPressedFunction))

Have you tried overriding the title?

override func awake(withContext context: Any?)
{
    self.setTitle("Cancel")       
    super.awake(withContext: context)
}

override func willActivate()
{
    self.setTitle("Cancel")
}
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!