You can try userDidTakeScreenshotNotification
and capturedDidChangeNotification
.
○userDidTakeScreenshotNotification - UIApplication | Apple Developer Documentation https://developer.apple.com/documentation/uikit/uiapplication/1622966-userdidtakescreenshotnotificatio
○capturedDidChangeNotification - UIScreen | Apple Developer Documentation https://developer.apple.com/documentation/uikit/uiscreen/2921652-captureddidchangenotification
-
ForScreenShotViewController
- You captured screen shot, after colored black view appear.
-
ForScreenCapturedViewController
- You captured movie, after colored yellow view appear.
About detail wrote issue under link. https://qiita.com/takashings/items/3fad553fc97375ec7d9f
This is Sample Project / code.