diff --git a/Tusker/Views/ScrollingSegmentedControl.swift b/Tusker/Views/ScrollingSegmentedControl.swift index 7dace042..a9d28d73 100644 --- a/Tusker/Views/ScrollingSegmentedControl.swift +++ b/Tusker/Views/ScrollingSegmentedControl.swift @@ -75,6 +75,13 @@ class ScrollingSegmentedControl: UIScrollView, UIGestureRecogni fatalError("init(coder:) has not been implemented") } + override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) { + super.traitCollectionDidChange(previousTraitCollection) + if traitCollection.preferredContentSizeCategory != previousTraitCollection?.preferredContentSizeCategory { + invalidateIntrinsicContentSize() + } + } + private func createOptionViews() { optionsStack.arrangedSubviews.forEach { $0.removeFromSuperview() }