如何在 xcode4 的界面生成器中设置视图的辅助功能标签?
我希望使用 KIF 为我们的 iPhone 应用程序编写功能测试。它使用“辅助功能标签”来识别正在测试的 UI 项目。如何在 xcode4 的界面生成器中设置视图的辅助功能标签?
I'm hoping to use KIF to write functional tests for our iphone app. It uses "accessibility labels" to identify the UI items it's testing. How do I set the accessibility label for a view in xcode4's interface builder?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
要以编程方式设置变量,您可以像这样使用它的属性:
在 InterfaceBuilder(内置于 XCode 4)中,您只需选择想要具有辅助功能标签的 UI 项目。 “实用程序”窗格中的“身份检查器”提供了一个文本字段,您可以在其中输入所需的任何标签文本。
To set the variable programmatically you can use its property like this:
In the InterfaceBuilder -- built into XCode 4 -- you just have to select the UI item you want to have an accessibility label. The "Identity Inspector", in the "Utility"-pane, offers a textfield where you can enter any label-text you want.