From b5ebe769f141533a9ab3bc3807feb4886c355356 Mon Sep 17 00:00:00 2001 From: bluesea <307723040@qq.com> Date: Thu, 7 Mar 2024 10:43:48 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=EF=BC=9A=201.=E5=8A=A8?= =?UTF-8?q?=E6=80=81=E8=8E=B7=E5=8F=96=E7=A9=BA=E9=97=B4=E5=9B=BE=E7=89=87?= =?UTF-8?q?=E7=9A=84=E5=A4=A7=E5=B0=8F=E3=80=81=E5=B0=BA=E5=AF=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../RecordingVideo/VRPhotoTransformController.swift | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/SwiftProject/SwiftProject/Project/Controller/RecordingVideo/VRPhotoTransformController.swift b/SwiftProject/SwiftProject/Project/Controller/RecordingVideo/VRPhotoTransformController.swift index a7f6d69..05f1d07 100644 --- a/SwiftProject/SwiftProject/Project/Controller/RecordingVideo/VRPhotoTransformController.swift +++ b/SwiftProject/SwiftProject/Project/Controller/RecordingVideo/VRPhotoTransformController.swift @@ -86,9 +86,13 @@ class VRPhotoTransformController: BaseController { print("这不是一张空间图片") return } - } - + let imgWidth:CGFloat = mImgView?.image?.size.width ?? 0.0 + let imgHeight:CGFloat = mImgView?.image?.size.height ?? 0.0 + let imgSize:Int = sourceImageData?.count ?? 0 + // size 表示数据的大小,单位为字节 + let imgMbSize = Double(imgSize) / 1024 / 1024 + let imgTitle = sourceImageURL?.pathComponents.last ?? "xx" mBottomBtn = UIButton.init(type: UIButton.ButtonType.custom) self.view.addSubview(mBottomBtn!) mBottomBtn!.backgroundColor = UIColor.hexStringToColor(hexString: "#5326D6") @@ -130,7 +134,8 @@ class VRPhotoTransformController: BaseController { mCenLab2!.textColor = UIColor.hexStringToColor(hexString: "#67617A") mCenLab2!.font = UIFont.systemFont(ofSize: 12) mCenView!.addSubview(mCenLab2!) - mCenLab2!.text = "00:00:03 · 10.9 MB" + mCenLab2!.text = "\(imgWidth) x \(imgHeight) · \(imgMbSize)" + mCenLab2!.text = String(format: "%.f x %.f · %.1f MB",imgWidth,imgHeight,imgMbSize) mCenLab2!.sizeToFit() if(mCenLab2!.width > mCenView!.width - 140){ mCenLab2!.width = mCenView!.width - 140 @@ -149,7 +154,7 @@ class VRPhotoTransformController: BaseController { mCenBtn!.right = mCenView!.width - 16 mCenBtn!.clipsToBounds = true mCenBtn!.layer.cornerRadius = 10 - mCenBtn!.setTitle("MV-HEVC", for: UIControl.State.normal) + mCenBtn!.setTitle("Spatial Photo", for: UIControl.State.normal) mCenBtn!.setTitleColor(UIColor.white, for: UIControl.State.normal) mCenBtn!.titleLabel?.font = UIFont.systemFont(ofSize: 12)