|
|
@ -363,16 +363,16 @@ final class CallVC: UIViewController, VideoPreviewDelegate {
|
|
|
|
NotificationCenter.default.addObserver(self, selector: #selector(audioRouteDidChange), name: AVAudioSession.routeChangeNotification, object: nil)
|
|
|
|
NotificationCenter.default.addObserver(self, selector: #selector(audioRouteDidChange), name: AVAudioSession.routeChangeNotification, object: nil)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
override func viewWillTransition(to size: CGSize, with coordinator: UIViewControllerTransitionCoordinator) {
|
|
|
|
// override func viewWillTransition(to size: CGSize, with coordinator: UIViewControllerTransitionCoordinator) {
|
|
|
|
super.viewWillTransition(to: size, with: coordinator)
|
|
|
|
// super.viewWillTransition(to: size, with: coordinator)
|
|
|
|
|
|
|
|
//
|
|
|
|
if let existingSublayer = fadeView.layer.sublayers?[0] as? CAGradientLayer {
|
|
|
|
// if let existingSublayer = fadeView.layer.sublayers?[0] as? CAGradientLayer {
|
|
|
|
let layer = CAGradientLayer()
|
|
|
|
// let layer = CAGradientLayer()
|
|
|
|
layer.frame = CGRect(x: 0, y: 0, width: size.width, height: 64)
|
|
|
|
// layer.frame = CGRect(x: 0, y: 0, width: size.width, height: 64)
|
|
|
|
layer.colors = existingSublayer.colors
|
|
|
|
// layer.colors = existingSublayer.colors
|
|
|
|
fadeView.layer.replaceSublayer(existingSublayer, with: layer)
|
|
|
|
// fadeView.layer.replaceSublayer(existingSublayer, with: layer)
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
deinit {
|
|
|
|
deinit {
|
|
|
|
UIDevice.current.endGeneratingDeviceOrientationNotifications()
|
|
|
|
UIDevice.current.endGeneratingDeviceOrientationNotifications()
|
|
|
|