I've been playing with iOS app lifecycle to learn it. I've created a super-simple app which just prints application delegate methods called. However, I observe some strange behaviour.
[Case 1] When I swipe from bottom to up to open control center I get only following delegate method called (I just open it, don't close):
- applicationWillResignActive
[Case 2] When I swipe from top down to open notification center I get following sequence (same here - just open it, don't close):
- applicationWillResignActive // Here I start dragging
- applicationDidBecomeActive // Notification Center opened, shouldn't my app being fully inactive here?
- applicationWillResignActive
Methods 2 and 3 are called almost immediately (looks like between calls is ~1ms or less) after each other when Notification Center is fully opened which is confusing.
So, the questions are:
- Is it an expected behaviour?
- If yes, what actions should/might be done in didBecomeActive?
- What is the difference from iOS/programming point between so similar from user point actions leading to so different behavior of app lifecycle?
P.S. Got same results on both iPhone and Simulator with latest Xcode (9.3) and iOS (11.3).