首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >UITableViewRowAction accessibilityValue

UITableViewRowAction accessibilityValue
EN

Stack Overflow用户
提问于 2016-09-21 21:02:13
回答 1查看 274关注 0票数 0

我正在尝试为UITableViewRowAction的按钮设置一个辅助功能标签/值,以便在appium自动化中使用它,但是由于某种原因,辅助功能还没有被识别出来

代码语言:javascript
复制
cancel = UITableViewRowAction(style: .Destructive, title: title) { action, index in
                                tableView.setEditing(false, animated: true)
                                let order = self.viewModel.orders[indexPath.row].order
                                self.performSegueWithIdentifier( self.cancelOrderConfirmationSegueId, sender: order)
                            }


cancel.accessibilityValue = "SomeValue"
cancel.accessibilityLabel = "SomeLabel"

最后,value属性提醒为nil,label属性获取title的名称(取消)

我想知道是否可以修改这种类型的对象的可访问性?

EN

回答 1

Stack Overflow用户

发布于 2016-09-21 23:02:01

我鼓励您要么匹配标题,要么设置一个唯一的accessibilityIdentifier,它专门用于像这样的UI自动化任务。看看能不能坚持下去。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/39617341

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档