清除无效代码

This commit is contained in:
bluesea 2024-04-02 16:13:00 +08:00
parent 7dc28e5c6c
commit a898f957f9

View File

@ -268,14 +268,7 @@ class CCSpatialShootController: BaseController {
// view.backgroundColor = .white
outputVideoURL = URL.documentsDirectory.appendingPathComponent("output.MOV")
//======
//
// UIDevice.current.beginGeneratingDeviceOrientationNotifications()
// // UIDevice.orientationDidChangeNotification
// NotificationCenter.default.addObserver(self, selector: #selector(orientationDidChange), name: UIDevice.orientationDidChangeNotification, object: nil)
configureSession() //
setUI()
@ -302,7 +295,7 @@ class CCSpatialShootController: BaseController {
//
getAlbumFirstPhoto()
orientationDidChange()
// orientationDidChange()
enableShutterBtn(false)
}
@ -503,16 +496,7 @@ class CCSpatialShootController: BaseController {
}
//MARK: -
func showTips() {
// self.view.addSubview(tipsLabel)
// self.view.bringSubviewToFront(tipsLabel)
// UIView.animate(withDuration: 3, delay: 2.0,options: .curveEaseInOut) {
// self.tipsLabel.alpha = 0
// } completion: { finished in
// self.tipsLabel.isHidden = true
// }
}
func showHorizontalScreenTips() {
self.horizontalImageView.isHidden = false
@ -616,20 +600,7 @@ class CCSpatialShootController: BaseController {
//
@objc func shutterPhotoButtonAction(){
// do {
// try wideAngleCameraDevice?.lockForConfiguration()
//// wideAngleCameraDevice?.ramp(toVideoZoomFactor: wideAngleCameraDevice!.videoZoomFactor+1.0, withRate: 2)
// wideAngleCameraDevice?.videoZoomFactor = wideAngleCameraDevice!.videoZoomFactor+1.0
// wideAngleCameraDevice?.unlockForConfiguration()
//
// print("factor:\(wideAngleCameraDevice!.videoZoomFactor)")
// }
// catch {
// print("wide:err")
// }
//
// return
shutterPhotoButton.backgroundColor = .gray
@ -900,46 +871,7 @@ class CCSpatialShootController: BaseController {
}
@objc fileprivate func orientationDidChange() {
// enableShutterBtn(false)
// switch UIDevice.current.orientation {
// case .unknown:
// print("")
// case .portrait:
// print("")
// imageCGImagePropertyOrientation = .up
// imageOrientation = .up
//
// autoStopRecordVideo()
// showHorizontalScreenTips()
// case .portraitUpsideDown:
// print("")
// autoStopRecordVideo()
// imageCGImagePropertyOrientation = .down
// imageOrientation = .down
// showHorizontalScreenTips()
// case .landscapeLeft:
// print("")
// imageCGImagePropertyOrientation = .left
// imageOrientation = .left
// hidenHorizontalScreenTips()
// enableShutterBtn(true)
// case .landscapeRight:
// print("")
// imageCGImagePropertyOrientation = .right
// imageOrientation = .right
// hidenHorizontalScreenTips()
// enableShutterBtn(true)
// case .faceUp:
// autoStopRecordVideo()
// print("")
// case .faceDown:
// autoStopRecordVideo()
// print("")
// default:
// break
// }
}
//
func autoStopRecordVideo(){
@ -953,7 +885,6 @@ class CCSpatialShootController: BaseController {
deinit {
//
// NotificationCenter.default.removeObserver(self, name: UIDevice.orientationDidChangeNotification, object: nil)
// //
// UIDevice.current.endGeneratingDeviceOrientationNotifications()