Prevent iOS from taking screen capture of app before going into background

后端 未结 10 2656
Happy的楠姐
Happy的楠姐 2020-11-29 22:35

You all might know that iOS takes a screen shot of your application before throwing it into the background. This is usually for a better User experience like quick animation

10条回答
  •  北海茫月
    2020-11-29 22:52

    You are on the right track. This is Apple's recommended way to do this as noted in the iOS Application Programming Guide:

    Remove sensitive information from views before moving to the background. When an application transitions to the background, the system takes a snapshot of the application’s main window, which it then presents briefly when transitioning your application back to the foreground. Before returning from your applicationDidEnterBackground: method, you should hide or obscure passwords and other sensitive personal information that might be captured as part of the snapshot.

提交回复
热议问题