Camera fixes

This commit is contained in:
Ilya Laktyushin
2023-10-19 20:44:16 +04:00
parent ec51634dcc
commit deaf722d85
10 changed files with 154 additions and 138 deletions

View File

@@ -1,6 +1,7 @@
import Foundation
import UIKit
import Display
import AsyncDisplayKit
import ComponentFlow
import RoundedRectWithTailPath
@@ -431,3 +432,35 @@ private final class SliderView: UIView {
func performAction() {
}
}
final class CameraFrontFlashOverlayController: ViewController {
class Node: ASDisplayNode {
init(color: UIColor) {
super.init()
self.backgroundColor = color
}
}
private let color: UIColor
init(color: UIColor) {
self.color = color
super.init(navigationBarPresentationData: nil)
}
required init(coder aDecoder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
override func loadDisplayNode() {
self.displayNode = Node(color: self.color)
self.displayNodeDidLoad()
}
func dismissAnimated() {
self.displayNode.layer.animateAlpha(from: 1.0, to: 0.0, duration: 0.25, removeOnCompletion: false, completion: { _ in
self.dismiss()
})
}
}