Skip to content

Commit

Permalink
change tab bar items parent + layout logic (TODO: correct items and t…
Browse files Browse the repository at this point in the history
…ext positions)
  • Loading branch information
igork-ramotion committed Oct 14, 2019
1 parent 1799b00 commit f5c9a9e
Show file tree
Hide file tree
Showing 5 changed files with 247 additions and 319 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import UIKit
extension RAMAnimatedTabBarController {

func createBottomLine() {
guard let currentItem = (containers.filter { $0.value.tag == 0 }).first?.value else { return }
guard let currentItem = containers.first else { return }

let container = UIView()
container.backgroundColor = .clear
Expand Down Expand Up @@ -66,7 +66,7 @@ extension RAMAnimatedTabBarController {

func setBottomLinePosition(index: Int, animated: Bool = true) {
guard let itemsCount = tabBar.items?.count, itemsCount > index,
let currentItem = (containers.filter { $0.value.tag == index}).first?.value else { return }
let currentItem = containers.at(index) else { return }

lineLeadingConstraint?.isActive = false

Expand Down
Loading

0 comments on commit f5c9a9e

Please sign in to comment.