Skip to content

Commit

Permalink
fix rotation bug on segmented control (microsoft#1411)
Browse files Browse the repository at this point in the history
  • Loading branch information
harrieshin authored and huwilkes committed Dec 5, 2022
1 parent a2db147 commit 8478042
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions ios/FluentUI/SegmentedControl/SegmentedControl.swift
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ open class SegmentedControl: UIView, TokenizedControlInternal {
open override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) {
super.traitCollectionDidChange(previousTraitCollection)
invalidateIntrinsicContentSize()
layoutSubviews()
setNeedsLayout()
}

open override func sizeThatFits(_ size: CGSize) -> CGSize {
Expand Down Expand Up @@ -399,10 +399,6 @@ open class SegmentedControl: UIView, TokenizedControlInternal {
}
}

func intrinsicContentSizeInvalidatedForChildView() {
invalidateIntrinsicContentSize()
}

/// Used to retrieve the view from the segment at the specified index
open func segmentView(at index: Int) -> UIView? {
guard index <= buttons.count else {
Expand Down

0 comments on commit 8478042

Please sign in to comment.