applicationDidBecomeActive firing on deactivation on iPhone X

后端 未结 1 1140
广开言路
广开言路 2021-01-21 06:19

Is anyone else having trouble with applicationDidBecomeActive incorrectly firing on deactivation of the app on the new iPhone X?

Here\'s my test ap

相关标签:
1条回答
  • 2021-01-21 06:39

    In fact there are three notifications fired in rapid succession when the application is deactivated in the iPhone X Simulator:

    1. UIApplicationWillResignActive
    2. UIApplicationDidBecomeActive
    3. UIApplicationWillResignActive

    This is wrong (and you might want to file a bug report), but it is something that could happen if a user deactivates - activates – deactivates the app quickly, so the app should cope with that situation anyway.

    Both notifications must be handled in a symmetric fashion (and they come properly balanced, even with that bug): Actions done on "activate" must be reversed on "deactivate".

    0 讨论(0)
提交回复
热议问题