相关疑难解决方法(0)

使用VoiceOver更改已读项目的顺序

我在屏幕上有一堆按钮,这些按钮直观地定位,但不是由VoiceOver按直观顺序读取的.这是因为某些按钮(如向上和向下)位于彼此的上方和下方.然而,画外音似乎开始从左到右,从上到下阅读.

这导致画外音在"向上"之后读取"向上"右侧的按钮,而不是在之后立即读取"向下".

如何强制画外音读取我想要阅读的按钮?我应该提一下,我正在使用画外音上的滑动到循环元素功能.

我的所有按钮都是UIView和UIButton的子类.这是我使用的按钮启动器的示例.忽略像素数 - 我知道这是糟糕的形式,但我现在处于紧张状态:

UIButton* createSpecialButton(CGRect frame, 
                                 NSString* imageName, 
                                 NSString* activeImageName,
                                 id target,
                                 SEL obClickHandler) 
{
    UIButton* b = [UIButton buttonWithType:UIButtonTypeCustom];
    [b setImage:[GlobalHelper nonCachedImage:imageName ofType:@"png"] 
       forState:UIControlStateNormal];
    [b setImage:[GlobalHelper nonCachedImage:activeImageName ofType:@"png"] 
       forState:UIControlStateHighlighted];
    [b addTarget:target action:obClickHandler forControlEvents:UIControlEventTouchUpInside];    
    b.frame= frame;
    return b;
}


- (UIButton *) createSendButton {
    CGFloat yMarker = 295;

    UIButton* b = createSpecialButton(CGRectMake(160, yMarker, 70, 45),
                                          @"Share_Btn",
                                          @"Share_Selected_Btn",
                                          self,
                                          @selector(sendAction));
    b.accessibilityHint = @"Send it!";
    b.accessibilityLabel = @"Stuff for voiceover to be added";
    [self.view addSubview:b];

    return b;
}
Run Code Online (Sandbox Code Playgroud)

accessibility ios voiceover

29
推荐指数
4
解决办法
3万
查看次数

标签 统计

accessibility ×1

ios ×1

voiceover ×1