'iOS screen captured post false notification but I not stop recording
when my app is recording,I click recording in statusbar on the left, then it post the captured false notification below with alert, but I havent click stop button in alert; then it post the captured true notification when I click cancel button.
it should not post notification when I click the stop button?
it was some bug for this problem?
private func addNotificationForCaptured() {
NotificationCenter.default.addObserver(self, selector: #selector(screenCapturedDidChange), name: UIScreen.capturedDidChangeNotification, object: nil)
}
@objc func screenCapturedDidChange(noti: Notification) {
if let screen: UIScreen = noti.object as? UIScreen {
print(screen.isCaptured)
}
}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
