I have video playing in my application which I don\'t want to be recorded. What Netflix application do is that they let the audio capture but not the video whi
You can listen for a UIScreenCapturedDidChange
notification.
NotificationCenter.default.addObserver(self, selector: #selector(screenCaptureChanged), name: NSNotification.Name.UIScreenCapturedDidChange, object: nil)
This is called when iOS 11 screen recording begins and ends. When the user is recording the screen, you can modify the UI to block any content that you don't want recorded.
This notification is fired when UIScreen
's isCaptured
property changes. You can also inspect this property yourself:
UIScreen.main.isCaptured