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

后端 未结 10 2661
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 23:07

    I came across the same issue, and my research has lead me to the following answers:

    • set a blurry screen overlay before the app goes in the background and once the app becomes active remove this overlay

    • if it is iOS 7 or later you can use the function ignoreSnapshotOnNextApplicationLaunch

    See in apple documentation: https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIApplication_Class/Reference/Reference.html#//apple_ref/occ/instm/UIApplication/ignoreSnapshotOnNextApplicationLaunch

    I hope this helps somebody.

提交回复
热议问题