How to add an accessibility label to a minus image that is added to a tableview cell?

I create a tableView with custom cells, with each cell being created with the following code:

UITableViewCell    * cell = [tableView dequeueReusableCellWithIdentifier:kEditSymbolCellId];

I'm coming back tableView.isEditing; set.

and I have a minus button visible from the exit. If the editing style is set to UITableViewCellEditingStyleDelete
somewhere ( if (editingStyle == UITableViewCellEditingStyleDelete) { passes).

Where I will need to change the code to add an accessibility label.

I am creating a custom class cell. It has only this:

@interface WidgetEditCell : UITableViewCell
@property (retain, nonatomic) IBOutlet UILabel *symbolLabel;
@property (retain, nonatomic) IBOutlet UILabel *subtitleLabel;

With a initWithStyleand a setSelectedin .m, nothing will change the damn negative image. someone please help.

+4
source share
1 answer

accessibilityLabel, "" . , :

testing accessibilityLabel

, :

  • UIAlertView , . , , , , ( ).

  • . .

  • , accessibilityLabel , , UILabel, .

    UIButton *someButton = [[UIButton alloc] initWithFrame:CGRectMake(x, y, h, w)];
    someButton.backgroundColor = [UIColor clearColor];
    someButton.accessibilityLabel = @"SomeNSString";
    

, , , , , , . , , .

Image from Ray Wenderlich

+3

All Articles