如何使用目标 c 中的辅助功能选项



我正在为盲人开发一款游戏。对于某些按钮,辅助功能对我不起作用。

按钮

是随机生成的,当用户单击按钮时播放音乐。

我用于创建按钮的代码。

UIButton* button=[[UIButton alloc] init];
[button setTitle:@"" forState:UIControlStateNormal];
[button setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
[[button layer] setBorderWidth:2.0f];
button.frame=CGRectMake(0, 0, 90, 90);
button.hidden=YES;
[button setAccessibilityHint:nil];
[button setAccessibilityLabel:nil];

每当选择按钮时,都会调用该按钮的语音。如何禁用按钮的配音。

帮助我解决以下问题

1) 我无法选择几个按钮2)禁用按钮的语音。

*游戏在没有辅助功能选项的情况下运行良好。

try [button setAccessibilityElement:false]

最新更新