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

Can't change elements after creation #11

Open
Gargo opened this issue Mar 21, 2020 · 1 comment
Open

Can't change elements after creation #11

Gargo opened this issue Mar 21, 2020 · 1 comment

Comments

@Gargo
Copy link

Gargo commented Mar 21, 2020

For example I need to show "login view controller" and if user input login and password then I need to show "profile view controller. How to do that with this control?
I try to overwrite viewControllers property but it seems your control appends changes instead of replacing
And of course tabBar property is made private which doesn't allow to fix this bug externally. Even if I find it as a subview - each its method is marked private!

Men if you develop a public library for using with cocoapods use private in exception cases only!

@Gargo
Copy link
Author

Gargo commented Mar 22, 2020

example of solution (but i must edit it in this library directly):

internal var viewControllers = [UIViewController]() {
        didSet {
            for v in stackView.subviews {
                v.removeFromSuperview()
            }
            drawTabs()
            guard !viewControllers.isEmpty else { return }
            drawConstraint()
            layoutIfNeeded()
            didSelectTab(index: 0, forceUpdate: true)
        }
    }

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

1 participant