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

查看:85
本文介绍了可以在界面构建器中设置辅助功能标识符吗? 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.

您只需将其作为视图访问即可。 accessibilityIdentifier

You could simply access it as view.accessibilityIdentifier

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

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