我可以在界面生成器中设置辅助功能标识符吗?Xcode4.2 [英] can I set accessibility identifier in interface builder? Xcode4.2

查看:30
本文介绍了我可以在界面生成器中设置辅助功能标识符吗?Xcode4.2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只能在界面构建器中设置辅助功能标签,但在 UI 自动化中,我需要辅助功能标识符来获取 UI 元素.有什么办法可以做到这一点?

I can only set Accessibility Label in interface builder, but in UI Automation,I need Accessibility Identifier to get the UI elements. any way to do this?

推荐答案

在 Xcode 7.1 (ios 9.0) 中,您可以尽可能简单地做到这一点.请找到附件中的图片.

In Xcode 7.1 (ios 9.0) you could do it as simple as possible. Please find the image attached.

您可以简单地以 view.accessibilityIdentifier 的形式访问它

You could simply access it as view.accessibilityIdentifier

这篇关于我可以在界面生成器中设置辅助功能标识符吗?Xcode4.2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆