mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
Camera fixes
This commit is contained in:
@@ -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()
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user