-
Notifications
You must be signed in to change notification settings - Fork 34
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
Adding a tab via activateTab
when viewControllers
is empty causes crash.
#1
Comments
activateTab
when viewControllers
is empty causes crash.activateTab
when viewControllers
is empty causes crash.
A little more information on this. As long as the // No crash
self.viewControllers = [ ]
self.activateTab(Tab(title: "Red", color: .red)) |
The above commit (46bf391) appears to solve the problem for me. |
Thanks for looking into this, @iosdevzone. I'll take a look into this as well. If you have a working solution, feel free to open a PR. |
I've opened PR #2, which fixes this issue locally for me. Can you confirm? |
Thanks for the speedy response. Yes, #2 solves the problem and probably does less unnecessary work than my solution. Oh and also, thanks for this great framework. It's saved me a ton of time! |
If the view controllers array is empty and
activateTab
is called to add a tab an assertion failure will cause the program to crashThis behavior can be seen in the Sample project by making the following edit to
ViewController.swift
I haven't been able to quite figure out what is going on. If I do a PR will be forthcoming.
The text was updated successfully, but these errors were encountered: