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)