Custom UITableview cell accessibility not working correctly

佐手、 提交于 2019-12-10 17:41:58

问题


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 ;
    }}

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

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


回答1:


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

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..

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



来源:https://stackoverflow.com/questions/14334272/custom-uitableview-cell-accessibility-not-working-correctly

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!