-
Notifications
You must be signed in to change notification settings - Fork 268
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
viewDidLoad is called on application start, but should be called on tab activation #373
Comments
@bugzhunter Yes, I know the reason of that error... It's because of PR: #350 - It tries to inject properties into UIViews, so views are mistakely loaded on Have you ideas how to fix your problem and keep this PR working? If I'll come up with something good, this problem would be fixed asap |
What drawbacks would have something like this? https://gist.github.com/bugzhunter/a6e0090469243c98b6f2#file-gistfile1-m-L14-L21 |
The problem here: if view is not loaded (which is always true at this stage), properties will not be injected into UIView, because this code called once, after UIVIewController created. The correct solution is: try to inject properties into view, after it's loaded. (i.e. after viewDidLoad). Right now I think only option is to use method swizzling and replace |
@bugzhunter, Fixed in |
Kudos! |
When UIStoryboard.initialViewController is UITabBarController, Typhoon runs through all childViewControllers and indirectly calls viewDidLoad in all these view controllers. It's happening on the start of an application, but default behaviour is to receive viewDidLoad on first tab activation.
Here is gist with code from Typhoon that cause such behaviour https://gist.github.com/anonymous/2b6573c18e711888ced8#file-gistfile1-m-L10-L16
The text was updated successfully, but these errors were encountered: