实现:

1.图片转码页面,选择转出格式后,转出格式选择处自动变为已选择的格式
This commit is contained in:
bluesea 2024-03-07 11:47:08 +08:00
parent ed3bb0f1d8
commit a4b31f69d3

View File

@ -9,6 +9,7 @@ import UIKit
import DeviceKit import DeviceKit
import SVProgressHUD import SVProgressHUD
import Photos import Photos
import CoreImage
class VRPhotoTransformController: BaseController { class VRPhotoTransformController: BaseController {
// var heroAsset1:AVAsset? // var heroAsset1:AVAsset?
@ -192,6 +193,7 @@ class VRPhotoTransformController: BaseController {
mTabView!.backgroundColor = UIColor.hexStringToColor(hexString: "#1F1E20") mTabView!.backgroundColor = UIColor.hexStringToColor(hexString: "#1F1E20")
mTabView?.clipsToBounds = true mTabView?.clipsToBounds = true
mTabView?.layer.cornerRadius = 12 mTabView?.layer.cornerRadius = 12
mTabView?.mTableView?.isScrollEnabled = false
mTabView?.handle = {dic in mTabView?.handle = {dic in
print(dic) print(dic)
self.selectedCellAction(dic) self.selectedCellAction(dic)
@ -255,14 +257,34 @@ class VRPhotoTransformController: BaseController {
3D HOU 3D HOU
3D FOU 3D FOU
*/ */
let action1 = UIAlertAction(title: "3D HSBS半宽左右格式" , style: .default) { (action:UIAlertAction) in
let action1 = UIAlertAction(title: "3D HSBS半宽左右格式" , style: .default) { [self] (action:UIAlertAction) in
print("3D HSBS半宽左右格式")
let popData = [
(type:CCTransformParameterType.format3D,title:"3D 格式",name:"3D HSBS")]
mTabView?.setSpatialParametersData(data: popData)
} }
let action2 = UIAlertAction(title: "3D FSBS全款左右格式" , style: .default) { (action:UIAlertAction) in let action2 = UIAlertAction(title: "3D FSBS全宽左右格式" , style: .default) { [self] (action:UIAlertAction) in
print("3D FSBS全宽左右格式")
let popData = [
(type:CCTransformParameterType.format3D,title:"3D 格式",name:"3D FSBS")]
mTabView?.setSpatialParametersData(data: popData)
} }
let action3 = UIAlertAction(title: "3D HOU半高上下格式" , style: .default) { (action:UIAlertAction) in let action3 = UIAlertAction(title: "3D HOU半高上下格式" , style: .default) { [self] (action:UIAlertAction) in
print("3D HOU半高上下格式")
let popData = [
(type:CCTransformParameterType.format3D,title:"3D 格式",name:"3D HOU")]
mTabView?.setSpatialParametersData(data: popData)
} }
let action4 = UIAlertAction(title: "3D FOU全高上下格式" , style: .default) { (action:UIAlertAction) in let action4 = UIAlertAction(title: "3D FOU全高上下格式" , style: .default) { [self] (action:UIAlertAction) in
print("3D FOU全高上下格式")
let popData = [
(type:CCTransformParameterType.format3D,title:"3D 格式",name:"3D FOU")]
mTabView?.setSpatialParametersData(data: popData)
} }
let cancelAction = UIAlertAction(title: "取消", style: .cancel, handler: nil) let cancelAction = UIAlertAction(title: "取消", style: .cancel, handler: nil)
alert.addAction(action1) alert.addAction(action1)
alert.addAction(action2) alert.addAction(action2)
@ -339,4 +361,7 @@ class VRPhotoTransformController: BaseController {
// } // }
return true return true
} }
} }