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

Double invocation of commonInit() #2

Open
tjanela opened this issue Feb 2, 2017 · 0 comments
Open

Double invocation of commonInit() #2

tjanela opened this issue Feb 2, 2017 · 0 comments

Comments

@tjanela
Copy link

tjanela commented Feb 2, 2017

We are seeing cases of a double awakeFromNib() invocation of the WKTabBarController instance.
This causes a duplication of the container view, which in turn, might causes problems if you are relying on a particular view hierarchy for additional customisation.

There is a particular setup that might help reproducing this.
We have two segues that point to a WKTabBarController subclass on storyboards.
One storyboard contains the definition of the Scene and another storyboard uses a Storyboard Reference to execute a segue to that scene. The latter is the one that seems to trigger this double invocation.

A proposed fix is to introduce a nil check at the top of commonInit():

func commonInit() {
    if(container != nil){
        return
    }
    container = UIView()
    ...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant