저는 UITableViewController가 있으며 일반 텍스트처럼 보이도록 섹션 헤더를 사용자 정의하려고합니다. 나는 사용자 정의 headerView (아래에 설명 됨)에 하위 뷰를 추가하면 VoiceOver 헤더 탐색을 중단한다는 것을 알게되었습니다.사용자 정의 viewForHeaderInSection에 하위 뷰를 추가하면 VoiceOver 탐색이 중단됩니다.
예를 들어는 : HEADER1, HEADER2, Header3 : 나는 세 가지 헤더 테이블을 말해봐. 의도 한대로 나는 해설 로터가 머리글로 이동 전환 할 수 viewForHeaderInSection 방법의 사용자 정의 구현하지 않고
모든 것이 작동합니다.다음과 같은 방법으로 viewForHeaderInSection 메서드를 구현할 때 Header1에서 Header2로 이동하여 Header2로 백업 할 수 있지만 voiceover는 모든 헤더를 잃습니다 ("헤더 없음").
headerView에 headerView를 추가 할 때 문제가 있음을 발견했습니다. voiceLover가 선택하지 않도록 숨겨진 접근성 요소에 headerLabel을 설정하려고했지만 문제가 지속됩니다.
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section
{
UIView *headerView = [[UIView alloc] initWithFrame:CGRectMake(0,0,tableView.frame.size.width,30)];
UILabel *headerLabel = [[UILabel alloc] initWithFrame:CGRectMake(20, 0, headerView.frame.size.width-120.0, headerView.frame.size.height)];
headerLabel.textAlignment = UITextAlignmentLeft;
headerLabel.font = [UIFont boldSystemFontOfSize:22];
headerLabel.text = [headersArray objectAtIndex:section];
headerLabel.backgroundColor = [UIColor clearColor];
[headerView addSubview:headerLabel];
return headerView;
}
VoiceOver가 이와 같이 반응하는 이유에 대해 알려주세요.
감사합니다.
, 그것은 좋은 것 – romrom
사용자 정의 섹션 헤더를 사용하는 동안 접근성을 개선하고자하는 DEVS 목록에 나를 추가합니다. –