This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class PhotoCapture { | |
| // here some stuff for capture image, such as capture session, configurations, photo output | |
| // More detail : https://github.com/trilliwon/ArtCamera/blob/master/Camera/Controllers/PhotoCapture.swift | |
| } | |
| // MARK: - AVCapturePhotoCaptureDelegate | |
| extension PhotoCapture: AVCapturePhotoCaptureDelegate { | |
| func photoOutput(_ output: AVCapturePhotoOutput, willCapturePhotoFor resolvedSettings: AVCaptureResolvedPhotoSettings) { | |
| AudioServicesDisposeSystemSoundID(1108) | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| extension UIView { | |
| func isPossiblyVisible() -> Bool { | |
| guard isHidden == false, | |
| alpha > 0, | |
| bounds != .zero, | |
| let window = window, // In a window's view hierarchy | |
| window.isKeyWindow, // Does not consider cases covered by another transparent window | |
| window.hitTest(convert(center, to: nil), with: nil) != self | |
| else { return false } |