ViewDidLoad running after app returns to foreground

I see a lot of questions on the internet from people asking why ViewDidLoad is not called when their app returns to the foreground. To my chagrin, I have the opposite problem. My view is hitting both ViewDidLoad and ViewWillAppear every time it returns to the foreground. I believe this may be because the OS is garbage collecting my view on enter background, since it is a sizeable view that contains the overall navigation of the app. I'm also using some timers and ranging beacons, not sure if that is affecting it. My question is: because of this behavior there is a delay as the view gets recreated every time you return to the app. Is there some way to just preserve the state of the app between entering background/foreground? Thanks.

Tagged:
Sign In or Register to comment.