Post not yet marked as solved
Post marked as unsolved with 0 replies, 121 views
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)
}
}