Commit 68d0e141 by Daniel Dahan Committed by GitHub

Merge pull request #945 from MattKiazyk/master

Align Line on TabBar on bottom of scrollView on X
parents ea0e0027 8c91f846
......@@ -408,7 +408,7 @@ fileprivate extension TabBar {
guard shouldNotAnimateLineView else {
line.animate(.duration(0),
.size(width: v.bounds.width, height: lineHeight),
.position(x: v.center.x, y: .bottom == lineAlignment ? bounds.height - lineHeight / 2 : lineHeight / 2))
.position(x: v.center.x, y: .bottom == lineAlignment ? scrollView.bounds.height - lineHeight / 2 : lineHeight / 2))
return
}
......@@ -546,7 +546,7 @@ fileprivate extension TabBar {
line.animate(.duration(0.25),
.size(width: tabItem.bounds.width, height: lineHeight),
.position(x: tabItem.center.x, y: .bottom == lineAlignment ? bounds.height - lineHeight / 2 : lineHeight / 2),
.position(x: tabItem.center.x, y: .bottom == lineAlignment ? scrollView.bounds.height - lineHeight / 2 : lineHeight / 2),
.completion({ [weak self, isTriggeredByUserInteraction = isTriggeredByUserInteraction, tabItem = tabItem, completion = completion] in
guard let s = self else {
return
......
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