3

The workflow of my app is when I lost connection I redirect the app to a specific viewController, then on the viewWillAppear I do some treatment.

In the foreground mode this works perfectly.

In the background mode, the redirection is performed, but the viewWillAppear is not fired.

Is there any equivalent for viewWillAppear or any other way to check if the viewController has appeared while on background?

raed
  • 4,887
  • 4
  • 30
  • 49

1 Answers1

0

If you are in background the view is not shown: this is why i guess the viewWillApperar is not called.

I suggest you to move the code/check you need to do in the viewDidLoad method of the view controller, which is called after being loaded into memory.

Davide Lorenzi
  • 348
  • 2
  • 6