Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

views goes under tabbar #63

Open
nikolindima opened this issue Apr 20, 2020 · 7 comments
Open

views goes under tabbar #63

nikolindima opened this issue Apr 20, 2020 · 7 comments

Comments

@nikolindima
Copy link

views goes under tabbar

@antiguab
Copy link
Owner

sample code? Video? any more details?

@nikolindima
Copy link
Author

i fix it. but don't know how to make commit
public var viewControllers: [UIViewController] = [] {
didSet {
var i = Int(viewControllers.count) - 1
while i >= 0 {
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
}
}
}

need to add constraints to view

@nikolindima
Copy link
Author

Create pull request #64

@nikolindima
Copy link
Author

As I say. views goes under tabbar. This is your example project

screen

@pkasson
Copy link

pkasson commented May 25, 2020

Same issue - when using a VC with content, nothing displays. The debug hierarchy shows nothing for the view. I created a simple VC with a single label - "zero". All VC's show in the hierarchy, but the view itself, for the VC that has 'zero' is showing its content on the tab bar controller. Any VC with real content, always shows up with nothing, and black background (picture included).

Screen Shot 2020-05-25 at 7 00 42 AM

@pkasson
Copy link

pkasson commented May 25, 2020

It appears that the view lifecycle is not complete by the time the tab bar controller gets the view, so it has nothing to render yet. If the VC bg color is set in viewDidLoad, you do see that color, but none of the components from the IB ... something is not handled in the correct order.

@ghost
Copy link

ghost commented Sep 7, 2020

Timer.scheduledTimer(withTimeInterval: 0.1, repeats: false) { _ in
self.view.addSubview(baTabBarController.view)
}

Try this in your didload

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants