こんにちは。
iOSはアプリ内でスクリーンショットの撮影を制限することはできませんが、撮影を検知することはできます。
下記のコードで実現できます。
// Observerを登録
NotificationCenter.default.addObserver(self, selector: #selector(self.tookScreenshot),
name: NSNotification.Name.UIApplicationUserDidTakeScreenshot, object: nil)
...
// Observerを解放
NotificationCenter.default.removeObserver(self,
name: NSNotification.Name.UIApplicationUserDidTakeScreenshot, object: nil)
...
func tookScreenshot(){
....
}