Generating alert to User when didReceiveMemoryWarning is called

前端 未结 3 1788
长发绾君心
长发绾君心 2021-01-26 03:22

I\'ve seen some apps that generate a warning when low memory is detected. I tried to do this in my app but ran into a problem. Using the simulator to simulate a memory warning

3条回答
  •  一向
    一向 (楼主)
    2021-01-26 04:17

    Generally speaking, you shouldn't notify a user about low memory. After all, what can they do? Your app is the foreground app, which (aside from the Apple apps) is consuming most of the device's memory. What is the user going to do when they see the memory message?

    When you get a low memory notification, you should solely focus on freeing memory, without user interaction.

提交回复
热议问题