4

I'm trying out iOS app states, and I came into a wired behavior when using sceneWillResignActive function inside SecenDelegate, this function works normally when I put the app in the background or when opening ControlCenter, but when I pull the status bar the function called twice

What is the cause of the behavior?

Here some debug info:

------------- sceneWillResignActive ------------
----------- sceneDidBecomeActive -----------
------------- sceneWillResignActive ------------

The log shows that the scene resign active and then became active and then resign active again in one pull

  • the question is why the function is called twice when it should be called once? and if this is a normal behavior what is the cause of it? – Ibrahim Zakarya Sep 06 '20 at 05:13
  • It's definitely weird that `sceneDidBecomeActive` (and then `sceneWillResignActive` immediately after) is called when Notification Center is pulled all the way down. Makes me wonder if it's a bug in iOS, because I would not expect that to happen. – TylerP Sep 06 '20 at 05:48
  • @matt Oh really? Could you please provide this "well documentation"? Because I really struggle to find anything according to this super-weird and unexpected behaviour of system. – Stanislav Matviichuck Nov 23 '20 at 12:15

0 Answers0