Simple Screenrecordingdetector in Swift. Enjoy it.
It's really simple to use.
import NoCapture
class ViewController: UIViewController, NoCaptureDelegate {
let captureDetector = NoCapture.instance
override func viewDidLoad() {
super.viewDidLoad()
captureDetector.delegate = self
captureDetector.startDetection()
}
// DELGATE METHOD
func screenCaptureStatusChanged(isRecording: Bool) {
if isRecording {
self.view.backgroundColor = UIColor.red
} else {
self.view.backgroundColor = UIColor.white
}
}
}
NoCapture is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'NoCapture'
Marvin Knabe, info@appgewaltig.de
NoCapture is available under the MIT license. See the LICENSE file for more info.