forked from shadowfacts/Tusker
Fix ScrollingSegmentedControl being cut off at smaller the default dynamic type size
Closes #410
This commit is contained in:
parent
1de586f907
commit
a339884d1f
|
@ -75,6 +75,13 @@ class ScrollingSegmentedControl<Value: Hashable>: 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() }
|
||||
|
||||
|
|
Loading…
Reference in New Issue