Commit 44f686a0 by Daniel Dahan

issue-824: fixed initial TabBar line animation issue where the line alignment…

issue-824: fixed initial TabBar line animation issue where the line alignment was not correctly set during animation
parent 42b9f813
...@@ -397,9 +397,11 @@ fileprivate extension TabBar { ...@@ -397,9 +397,11 @@ fileprivate extension TabBar {
selected = tabItems.first selected = tabItems.first
} }
line.animate(.duration(0), guard let v = selected else {
.size(CGSize(width: selected!.width, height: lineHeight)), return
.position(CGPoint(x: selected!.center.x, y: .bottom == lineAlignment ? height - lineHeight / 2 : lineHeight / 2))) }
line.frame = CGRect(x: v.x, y: .bottom == lineAlignment ? height - lineHeight: 0, width: v.width, height: lineHeight)
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment