Skip to content

Commit

Permalink
check if isEnabled changed
Browse files Browse the repository at this point in the history
  • Loading branch information
joannaquu committed Jul 29, 2024
1 parent e4b4162 commit f6d1c16
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions ios/FluentUI/Tab Bar/TabBarItemView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,15 @@ class TabBarItemView: UIControl, TokenizedControlInternal {

override var isEnabled: Bool {
didSet {
isUserInteractionEnabled = isEnabled
if isEnabled {
accessibilityTraits.remove(.notEnabled)
} else {
accessibilityTraits.insert(.notEnabled)
if isEnabled != oldValue {
isUserInteractionEnabled = isEnabled
if isEnabled {
accessibilityTraits.remove(.notEnabled)
} else {
accessibilityTraits.insert(.notEnabled)
}
updateColors()
}
updateColors()
}
}

Expand Down

0 comments on commit f6d1c16

Please # to comment.