|
@@ -13,35 +13,7 @@ class TSAIListVC: TSBaseVC {
|
|
|
let sectionModel = TSBasicSectionModel()
|
|
|
dataArray.append(sectionModel)
|
|
|
|
|
|
- //调整光线
|
|
|
- sectionModel.addSubItemModel(
|
|
|
- createItemModel(
|
|
|
- leftImageName:"aiList_Enlighten",
|
|
|
- leftTitle: "Enlighten".localized,
|
|
|
- leftSubTitle: "Remove scratches and dirt".localized,
|
|
|
- rightViewStyle: 0,
|
|
|
- tapBlock: { [weak self] model, _, _ in
|
|
|
- guard let self = self else { return }
|
|
|
- enterSelectPhotos(style: .enlighten) { image in
|
|
|
- let baseVc = TSAIUploadPhotoVC(titleString: model.leftTitle ?? "",upLoadImage: image, generatorStyle: .enlighten)
|
|
|
- kPushVC(target: self, modelVC: baseVc)
|
|
|
- }
|
|
|
- }))
|
|
|
-
|
|
|
- //修复和上色老照片
|
|
|
- sectionModel.addSubItemModel(
|
|
|
- createItemModel(
|
|
|
- leftImageName:"aiList_Recreate",
|
|
|
- leftTitle: "Recreate".localized,
|
|
|
- leftSubTitle: "Remove scratches and dirt".localized,
|
|
|
- rightViewStyle: 0,
|
|
|
- tapBlock: { [weak self] model, _, _ in
|
|
|
- guard let self = self else { return }
|
|
|
- enterSelectPhotos(style: .recreate) { image in
|
|
|
- let baseVc = TSAIUploadPhotoVC(titleString: model.leftTitle ?? "",upLoadImage: image, generatorStyle: .recreate)
|
|
|
- kPushVC(target: self, modelVC: baseVc)
|
|
|
- }
|
|
|
- }))
|
|
|
+
|
|
|
|
|
|
//照片高清修复
|
|
|
sectionModel.addSubItemModel(
|
|
@@ -87,6 +59,38 @@ class TSAIListVC: TSBaseVC {
|
|
|
kPushVC(target: self, modelVC: baseVc)
|
|
|
}
|
|
|
}))
|
|
|
+
|
|
|
+ //修复和上色老照片
|
|
|
+ sectionModel.addSubItemModel(
|
|
|
+ createItemModel(
|
|
|
+ leftImageName:"aiList_Recreate",
|
|
|
+ leftTitle: "Recreate".localized,
|
|
|
+ leftSubTitle: "Bring new life to old photos".localized,
|
|
|
+ rightViewStyle: 0,
|
|
|
+ tapBlock: { [weak self] model, _, _ in
|
|
|
+ guard let self = self else { return }
|
|
|
+ enterSelectPhotos(style: .recreate) { image in
|
|
|
+ let baseVc = TSAIUploadPhotoVC(titleString: model.leftTitle ?? "",upLoadImage: image, generatorStyle: .recreate)
|
|
|
+ kPushVC(target: self, modelVC: baseVc)
|
|
|
+ }
|
|
|
+ }))
|
|
|
+
|
|
|
+ //调整光线
|
|
|
+ sectionModel.addSubItemModel(
|
|
|
+ createItemModel(
|
|
|
+ leftImageName:"aiList_Enlighten",
|
|
|
+ leftTitle: "Enlighten".localized,
|
|
|
+ leftSubTitle: "Easily fix lighting issues on photos".localized,
|
|
|
+ rightViewStyle: 0,
|
|
|
+ tapBlock: { [weak self] model, _, _ in
|
|
|
+ guard let self = self else { return }
|
|
|
+ enterSelectPhotos(style: .enlighten) { image in
|
|
|
+ let baseVc = TSAIUploadPhotoVC(titleString: model.leftTitle ?? "",upLoadImage: image, generatorStyle: .enlighten)
|
|
|
+ kPushVC(target: self, modelVC: baseVc)
|
|
|
+ }
|
|
|
+ }))
|
|
|
+
|
|
|
+
|
|
|
|
|
|
return dataArray
|
|
|
|
|
@@ -167,6 +171,8 @@ class TSAIListVC: TSBaseVC {
|
|
|
collectionView.snp.makeConstraints { make in
|
|
|
make.edges.equalToSuperview()
|
|
|
}
|
|
|
+
|
|
|
+ PlayerManager.shared.miniBar.isHidden = true
|
|
|
}
|
|
|
|
|
|
override func dealThings() {
|
|
@@ -241,17 +247,17 @@ extension TSAIListVC: UICollectionViewDataSource ,UICollectionViewDelegate {
|
|
|
extension TSAIListVC{
|
|
|
|
|
|
func enterSelectPhotos(style:TSGeneratorImageStyle,complete: @escaping (UIImage)->Void){
|
|
|
-// if style.userDefaultsKey.isEmpty{
|
|
|
-// self.pickSinglePhoto(maxBitSize:style.imageMaxBitSize,complete:complete)
|
|
|
-// }else{
|
|
|
-// TSAIListHintBaseVC.userDefaultsKey = style.userDefaultsKey
|
|
|
-// if TSAIListHintBaseVC.isShowUploadImageHint{
|
|
|
-// TSAIListHintBaseVC.isShowUploadImageHint = false
|
|
|
+ if style.userDefaultsKey.isEmpty{
|
|
|
+ self.pickSinglePhoto(maxBitSize:style.imageMaxBitSize,complete:complete)
|
|
|
+ }else{
|
|
|
+ TSAIListHintBaseVC.userDefaultsKey = style.userDefaultsKey
|
|
|
+ if TSAIListHintBaseVC.isShowUploadImageHint{
|
|
|
+ TSAIListHintBaseVC.isShowUploadImageHint = false
|
|
|
self.presentModalHintVC(config:style.config,complete:complete)
|
|
|
-// }else {
|
|
|
-// self.pickSinglePhoto(maxBitSize:style.imageMaxBitSize,complete:complete)
|
|
|
-// }
|
|
|
-// }
|
|
|
+ }else {
|
|
|
+ self.pickSinglePhoto(maxBitSize:style.imageMaxBitSize,complete:complete)
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
|