gpt4 book ai didi

ios - UIAlertView 按钮辅助功能

转载 作者:塔克拉玛干 更新时间:2023-11-02 09:07:14 26 4
gpt4 key购买 nike

[UIAlertView alertViewWithTitle:@"" message:@"Submit successfully!" cancelBlock:^(NSInteger buttonIndex) {
} dismissBlock:nil cancelButtonTitle:@"OK" otherButtonsTitles:nil, nil];

这是 UIAlertView 声明。但是,我希望对 cancelButton 进行 UI 测试。

[tester tapViewWithAccessibilityLabel:@"cancelButton"];

我应该如何为那个 cancelButton 添加可访问性?

最佳答案

您应该能够通过点击取消按钮来解除警报。您可以通过其标签来识别取消按钮,在您的情况下是“确定”。

关于ios - UIAlertView 按钮辅助功能,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25019309/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com