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 override default configuration #23

Closed
dcortright opened this issue Apr 5, 2018 · 6 comments
Closed

Can't override default configuration #23

dcortright opened this issue Apr 5, 2018 · 6 comments

Comments

@dcortright
Copy link

I can't seem to override the default configurations. My code is set up just like it was before version 1.0 except for the updates needed for version 1.0.

i.e changing backgroundImage to configuration.backgroundImage

It seems as though it's initializing with the defaults before it hits my own in ConfigureAppearance()

@dcortright
Copy link
Author

Follow up: The other pages seem to have my new configuration such as no gradient and the background image. But the initial view controller itself stays at the defaults.

@dcortright
Copy link
Author

Sorry for posting three in a row but I see now that I need to define my configuration before I even call loginCoordinator.start(animated: false)

Any defaults defined after this will not apply to the initialViewController

@danlozano
Copy link
Contributor

No worries! haha

Hmm so you're setting up the configuration from outside the LoginCoordinator? You're not subclassing.

Now that you can use the View Controller's separately, I did design it so that you must configure the view controller before calling super.viewDidLoad().

But I'll look into your issue, which is different because it's in the coordinator not the viewcontrollers, and see if it should be designed differently.

Could you share some code? How it did not work and how it does work now?

Thanks!

@dcortright
Copy link
Author

Ah, I found what my issue was. I was still calling configureAppearance() after super.start()

After switching those two around it works as you designed now!

@danlozano
Copy link
Contributor

Oh ok. Awesome! Glad it works now!

@LazyTravis
Copy link

omg, I meant the same issue. It took me an hour to update the old code.
Could anybody add more suggestion for the other guys?

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