From 17c88b62222bb0c1c91de87895ed3ae3fe7af1fd Mon Sep 17 00:00:00 2001 From: bluesea <307723040@qq.com> Date: Wed, 27 Mar 2024 14:28:45 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=BE=E7=89=87=E6=B5=8F=E8=A7=88=EF=BC=8C?= =?UTF-8?q?=E8=BF=9B=E5=85=A5=E9=A6=96=E9=80=89=E9=A1=B9=E6=94=B9=E4=B8=BA?= =?UTF-8?q?=E5=B9=B3=E8=A1=8C=E7=9C=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CCSpatialPhotoDisplayController.swift | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/SwiftProject/SwiftProject/Project/Controller/RecordingVideo/CCSpatialPhotoDisplayController.swift b/SwiftProject/SwiftProject/Project/Controller/RecordingVideo/CCSpatialPhotoDisplayController.swift index e3ad24f..b8114f5 100644 --- a/SwiftProject/SwiftProject/Project/Controller/RecordingVideo/CCSpatialPhotoDisplayController.swift +++ b/SwiftProject/SwiftProject/Project/Controller/RecordingVideo/CCSpatialPhotoDisplayController.swift @@ -92,7 +92,7 @@ class CCSpatialPhotoDisplayController: BaseController { button.layer.cornerRadius = 18 button.layer.borderWidth = 1 button.layer.borderColor = UIColor.white.cgColor - button.setTitle("单眼2D", for: UIControl.State.normal) + button.setTitle("平行眼", for: UIControl.State.normal) button.setImage(UIImage.init(named: "type_button_arrow_down"), for: .normal) button.updateBtnEdgeInsets(style: .Right, space: 10) button.setTitleColor(UIColor.white, for: UIControl.State.normal) @@ -111,8 +111,9 @@ class CCSpatialPhotoDisplayController: BaseController { return imageView }() - var typeData:[(icon:String,title:String,isHiden:Bool)] = [(icon:"type_check",title:"单眼2D",isHiden:false), - (icon:"type_check",title:"平行眼",isHiden:false), + var typeData:[(icon:String,title:String,isHiden:Bool)] = [(icon:"type_check",title:"平行眼",isHiden:false), + (icon:"type_check",title:"单眼2D",isHiden:false), + (icon:"type_check",title:"红蓝立体",isHiden:false), (icon:"type_check",title:"交叉眼",isHiden:false)] @@ -175,9 +176,9 @@ class CCSpatialPhotoDisplayController: BaseController { imgData = originalData //展示 let image = UIImage(data: originalData!) - mImgView.image = image +// mImgView.image = image imgOritentation = image?.imageOrientation ?? .left - + selectedSpatialType(selectedIndex: 0) let isSpatial = isSpatialImage(originalData: originalData!) if !isSpatial { print("这不是一张空间图片") @@ -398,12 +399,12 @@ class CCSpatialPhotoDisplayController: BaseController { let lciImage = CIImage(cgImage: frames.first!) let rciImage = CIImage(cgImage: frames[1]) - if(selectedIndex == 0){ + if(selectedIndex == 1){ //空间照片 --- 单眼2D(展示原照片或者广角或者主摄其中一个) let image = UIImage(data: photoOriginalData!) mImgView.image = image - }else if(selectedIndex == 1){ + }else if(selectedIndex == 0){ //平行眼 let newpb = joinImages( leftImage: lciImage, rightImage:rciImage )