Move Button accessibility to superclass

This commit is contained in:
Bas Broek
2017-07-11 19:44:46 +02:00
parent f43a15843a
commit d2fd3b112b
2 changed files with 5 additions and 1 deletions

View File

@@ -21,7 +21,6 @@ final class ButtonCell: SelectableCell {
super.init(frame: frame)
contentView.backgroundColor = .white
accessibilityTraits |= UIAccessibilityTraitButton
topSeparator = contentView.addBorder(.top)
bottomSeparator = contentView.addBorder(.bottom)

View File

@@ -39,6 +39,11 @@ class SelectableCell: UICollectionViewCell {
private lazy var overlay: UIView = {
return self.contentView.addOverlay()
}()
override init(frame: CGRect) {
super.init(frame: frame)
accessibilityTraits |= UIAccessibilityTraitButton
}
override func prepareForReuse() {
super.prepareForReuse()