除了强制触摸菜单中的项目外,我的 WatchKit 应用程序均在代码中使用 NSLocalizedString 进行本地化。我正在使用 Storyboard,界面生成器似乎无法为我提供菜单或项目的引用。有谁知道我们应该如何做到这一点?
最佳答案
您始终可以以编程方式创建菜单项,完全绕过 Storyboard,这将允许您轻松使用本地化字符串。查看 addMenuItemWithImage:title:action:
等文档: https://developer.apple.com/library/ios/documentation/WatchKit/Reference/WKInterfaceController_class/index.html#//apple_ref/occ/instm/WKInterfaceController/addMenuItemWithImage:title:action :
关于ios - 如何本地化 WatchKit 菜单项?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29881050/