-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
updated to Swift 4.2 and added swift version to podspec #617
Conversation
Hello @mtnbarreto ! Could you check this pull request? |
I would also like to see this merge come through. |
I decided to temporarily use Alexander repo directly, you can do it like this if you want : pod 'XLPagerTabStrip', git: 'https://github.com/alexanderkhitev/XLPagerTabStrip', branch: 'master' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR. I think there are some minor issues which I commented.
Sources/ButtonBarViewCell.swift
Outdated
@@ -33,8 +33,7 @@ open class ButtonBarViewCell: UICollectionViewCell { | |||
super.init(coder: aDecoder) | |||
|
|||
isAccessibilityElement = true | |||
accessibilityTraits |= UIAccessibilityTraitButton | |||
accessibilityTraits |= UIAccessibilityTraitHeader | |||
accessibilityTraits = [.button, .header] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you should use the insert
or formUnion
function here. The previous logic was adding the two traits to whatever was already in accessibilityTraits.
Sources/ButtonBarViewCell.swift
Outdated
@@ -44,9 +43,9 @@ open class ButtonBarViewCell: UICollectionViewCell { | |||
set { | |||
super.isSelected = newValue | |||
if (newValue) { | |||
accessibilityTraits |= UIAccessibilityTraitSelected | |||
accessibilityTraits = [.selected] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again. use accessibilityTraits.insert(.selected)
Sources/ButtonBarViewCell.swift
Outdated
} else { | ||
accessibilityTraits &= ~UIAccessibilityTraitSelected | ||
accessibilityTraits.formUnion(.selected) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And here you should remove selected and not add it: accessibilityTraits.remove(.selected)
@@ -349,8 +349,7 @@ open class ButtonBarPagerTabStripViewController: PagerTabStripViewController, Pa | |||
} | |||
cell.isAccessibilityElement = true | |||
cell.accessibilityLabel = cell.label.text | |||
cell.accessibilityTraits |= UIAccessibilityTraitButton | |||
cell.accessibilityTraits |= UIAccessibilityTraitHeader | |||
cell.accessibilityTraits = [.button, .header] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment as below
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mats-claassen thanks, it done
No description provided.