自定义 UITableview 单元格辅助功能无法正常工作 [英] Custom UITableview cell accessibility not working correctly

查看:37
本文介绍了自定义 UITableview 单元格辅助功能无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个加载 tableview 的类.在这个 tableview 中有 4 个部分,每个部分 1 行.每个部分行加载不同的自定义单元格.我已禁用自定义单元格的可访问性.但启用了单元格中元素的可访问性.

I have a class which loads a tableview. In this tableview there are 4 sections with 1 row each. Each section row loads different custom cells. I have disabled the accessibility of the custom cells. But enabled the accessibility for the elements in the cell.

打开旁白时,它首先正确读取每个单元格组件.但是当我们用三指手势滚动表格后,表格中的第一个或第二个单元格会聚焦并且画外音不会读取单元格内的元素.

With voice over ON, it reads each cell components correctly first. But after we scroll the table with three finger gesture, first or second cell in my table get focused and voice over does not read the elements inside the cell.

任何机构可以帮助我解决这个问题吗?

Can any body help me in this issue?

这是我用自定义单元格加载表格的代码

Here is the my code for loading the table with custom cell

-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ if ([indexPath section] == 1  ) 
    {
        static NSString* SettingsTableId = @"HomeAddress";
        pHomeAddressCell = (HomeAddress *)[tableView dequeueReusableCellWithIdentifier:SettingsTableId];

        if (pHomeAddressCell==nil) 
        {
            NSArray *nib=[[NSBundle mainBundle] loadNibNamed:@"HomeAddress" owner:self options:nil];
            pHomeAddressCell=[nib objectAtIndex:0];

        }
        pHomeAddressCell.delegate = self;
        return pHomeAddressCell ;
    }}

在自定义单元格HomeAddress"中,我有一个文本视图和两个按钮.

And in the custom cell "HomeAddress" I have a textview and two buttons.

我发现这个问题只存在于 iOS 6 以下的设备

I have found that this issue is only in devices with iOS below 6

推荐答案

Storyboards - Prototype Table View Cells Not Working With VoiceOver".. 至少在 iOS 5 中是这样.

"Storyboards - Prototype Table View Cells Not Working Well With VoiceOver".. at least in iOS 5.

我不知道..是否已在 iOS 6 中修复.问题似乎是 VoiceOver 或 UIAccessibility API 干扰了原型单元的加载.静态表格视图单元格不会出现此问题..

I don't know .. if it is fixed in iOS 6. The problem seems to be that VoiceOver or the UIAccessibility API is interfering with the loading of the prototype cell. The problem does not occur for static table view cells..

您可以查看 Open Radar 错误报告 http://www.openradar.me/search?查询=配音

You can check the Open Radar bug reports http://www.openradar.me/search?query=voiceover

这篇关于自定义 UITableview 单元格辅助功能无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆