Programmatically disabling screenshot in App

前端 未结 3 531
陌清茗
陌清茗 2021-01-06 07:07

I want to prevent taking screenshot of a page in app. how to do it programmatically so that screenshots cannot be taken.

Found code to detect screenshot. Can it be

3条回答
  •  别那么骄傲
    2021-01-06 07:30

    Technically that is possible, via the Photos framework, the docs for which can be found here.

    Example code can be found here.

    However, this will ask the user's permission first, and then again to confirm deletion; so possibly not the ideal solution. Unfortunately this is as good as it gets as Apple has the Camera Roll fairly locked down.

提交回复
热议问题