Skip to content
This repository was archived by the owner on Sep 20, 2023. It is now read-only.

Commit 7b4cf39

Browse files
authored
fix nav title for ios 10 and keep highlight while moving (#1423)
1 parent 57e0f09 commit 7b4cf39

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Classes/Views/NavigationTitleDropdownView.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,6 @@ final class NavigationTitleDropdownView: UIControl {
7777
fadeControls(alpha: 1)
7878
}
7979

80-
override func touchesMoved(_ touches: Set<UITouch>, with event: UIEvent?) {
81-
super.touchesMoved(touches, with: event)
82-
fadeControls(alpha: 1)
83-
}
84-
8580
override func touchesCancelled(_ touches: Set<UITouch>, with event: UIEvent?) {
8681
super.touchesCancelled(touches, with: event)
8782
fadeControls(alpha: 1)
@@ -111,6 +106,11 @@ final class NavigationTitleDropdownView: UIControl {
111106
self.accessibilityLabel = accessibilityLabel ?? title
112107

113108
invalidateIntrinsicContentSize()
109+
110+
translatesAutoresizingMaskIntoConstraints = false
111+
layoutIfNeeded()
112+
sizeToFit()
113+
translatesAutoresizingMaskIntoConstraints = true
114114
}
115115

116116
// MARK: Private API

0 commit comments

Comments
 (0)