Commit 8c91f846 by Matt Kiazyk Committed by GitHub

Align Line on TabBar on bottom of scrollView on X

parent 1050a898
...@@ -408,7 +408,7 @@ fileprivate extension TabBar { ...@@ -408,7 +408,7 @@ fileprivate extension TabBar {
guard shouldNotAnimateLineView else { guard shouldNotAnimateLineView else {
line.animate(.duration(0), line.animate(.duration(0),
.size(width: v.bounds.width, height: lineHeight), .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 return
} }
...@@ -546,7 +546,7 @@ fileprivate extension TabBar { ...@@ -546,7 +546,7 @@ fileprivate extension TabBar {
line.animate(.duration(0.25), line.animate(.duration(0.25),
.size(width: tabItem.bounds.width, height: lineHeight), .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 .completion({ [weak self, isTriggeredByUserInteraction = isTriggeredByUserInteraction, tabItem = tabItem, completion = completion] in
guard let s = self else { guard let s = self else {
return 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