Skip to content

Commit

Permalink
fix for case when view controllers are empty
Browse files Browse the repository at this point in the history
  • Loading branch information
igork-ramotion committed Nov 8, 2019
1 parent 3665d14 commit 76d074d
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions RAMAnimatedTabBarController/RAMAnimatedTabBarController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -132,13 +132,12 @@ open class RAMAnimatedTabBarController: UITabBarController {

// MARK: create methods
private func initializeContainers() {
guard let items = tabBar.items, items.count <= 5 else {
fatalError("More button not supported")
}

containers.forEach { $0.removeFromSuperview() }
containers.removeAll()

guard let items = tabBar.items else { return }
guard items.count <= 5 else { fatalError("More button not supported") }

for index in 0 ..< items.count {
let viewContainer = UIView()
viewContainer.isExclusiveTouch = true
Expand Down

0 comments on commit 76d074d

Please sign in to comment.