Skip to content

Commit

Permalink
Add selected accessibility trait to PSTCollectionViewCell for better …
Browse files Browse the repository at this point in the history
…interoperatibility with KIF.
  • Loading branch information
Jeff Arena committed Sep 4, 2013
1 parent f90f138 commit 7ea1d5a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions PSTCollectionView/PSTCollectionViewCell.m
Expand Up @@ -144,11 +144,13 @@ - (void)prepareForReuse {
self.layoutAttributes = nil;
self.selected = NO;
self.highlighted = NO;
self.accessibilityTraits = UIAccessibilityTraitNone;
}

// Selection highlights underlying contents
- (void)setSelected:(BOOL)selected {
_collectionCellFlags.selected = selected;
self.accessibilityTraits = selected ? UIAccessibilityTraitSelected : UIAccessibilityTraitNone;
[self updateBackgroundView:selected];
}

Expand Down

0 comments on commit 7ea1d5a

Please sign in to comment.