Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion BATabBarController/Classes/BATabBarController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
//SOFTWARE.

import UIKit

import SnapKit
public protocol BATabBarControllerDelegate: AnyObject {
func tabBarController(_ tabBarController: BATabBarController, didSelect: UIViewController)
}
Expand All @@ -42,6 +42,12 @@ public class BATabBarController: UIViewController {
let vc = viewControllers[i]
if let vcView = vc.view, let tabBar = tabBar {
self.view.insertSubview(vcView, belowSubview: tabBar)
vcView.snp.makeConstraints { (make) in
make.top.equalToSuperview()
make.leading.equalToSuperview()
make.trailing.equalToSuperview()
make.bottom.equalTo(tabBar.snp.top)
}
}
i -= 1
}
Expand Down