Skip to content

Commit 7b1717f

Browse files
committed
[Fix] #249 - 초록색 바가 따라오는 속도 수정
1 parent aa1eb86 commit 7b1717f

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

Terning-iOS/Terning-iOS/Resource/UIComponents/CustomSegmentedControl.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,13 +138,16 @@ private extension CustomSegmentedControl {
138138
let selectedSegmentFrame = frameForSegment(at: selectedSegmentIndex)
139139
let textWidth = calculateTextWidth(for: selectedSegmentIndex)
140140

141-
UIView.animate(withDuration: 0.27, delay: 0, options: .curveEaseOut, animations: {
141+
underbar.layer.removeAllAnimations()
142+
143+
UIView.animate(withDuration: 0.17, delay: 0, options: .curveLinear, animations: {
142144
self.underbar.frame = CGRect(
143145
x: selectedSegmentFrame.origin.x + (selectedSegmentFrame.width - textWidth) / 2,
144146
y: self.bounds.height - self.underbarInfo.height,
145147
width: selectedSegmentFrame.width,
146148
height: self.underbarInfo.height
147149
)
150+
self.layoutIfNeeded()
148151
})
149152
}
150153

0 commit comments

Comments
 (0)