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

ViewWillAppear not called when view is not a member variable of its ViewController #84

Open
jenniferpresto opened this issue Nov 4, 2019 · 1 comment
Assignees
Labels

Comments

@jenniferpresto
Copy link
Contributor

Issue caused in following scenario:

  • created a view as a local variable within a View Controller's viewDidLoad method
  • added that view as a subview of the ViewController's view
  • overrode the viewWillAppear method in the ViewController

viewWillAppear will not get called, but will get called if the view is a member variable within the View Controller

@peterobbin peterobbin self-assigned this Nov 4, 2019
@peterobbin
Copy link
Contributor

This could lead to some needed changes?


Currently, when a ViewController is created inside of a function. The SuperView will only be able to keep the View inside of the ViewController because of the addSubview( sampleVC->getView). The ViewController will be lost since it becomes out of scope, thus the needed signals inside of the view controller are not getting called.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants