fix nav title for ios 10 and keep highlight while moving (#1423)

This commit is contained in:
Ryan Nystrom
2018-01-16 19:50:38 -05:00
committed by GitHub
parent 57e0f09670
commit 7b4cf39b4a

View File

@@ -77,11 +77,6 @@ final class NavigationTitleDropdownView: UIControl {
fadeControls(alpha: 1)
}
override func touchesMoved(_ touches: Set<UITouch>, with event: UIEvent?) {
super.touchesMoved(touches, with: event)
fadeControls(alpha: 1)
}
override func touchesCancelled(_ touches: Set<UITouch>, with event: UIEvent?) {
super.touchesCancelled(touches, with: event)
fadeControls(alpha: 1)
@@ -111,6 +106,11 @@ final class NavigationTitleDropdownView: UIControl {
self.accessibilityLabel = accessibilityLabel ?? title
invalidateIntrinsicContentSize()
translatesAutoresizingMaskIntoConstraints = false
layoutIfNeeded()
sizeToFit()
translatesAutoresizingMaskIntoConstraints = true
}
// MARK: Private API