|
@@ -260,15 +260,20 @@ class TSPTPInputVC: TSBaseVC {
|
|
|
}
|
|
|
|
|
|
setUpCusStackView()
|
|
|
-
|
|
|
+
|
|
|
+ setHeaderCusStackView()
|
|
|
kDelayMainShort {
|
|
|
- self.collectionComponent.collectionView.parallaxHeader.view = self.cusStackView
|
|
|
- self.collectionComponent.collectionView.parallaxHeader.height = self.cusStackViewH
|
|
|
- self.collectionComponent.collectionView.parallaxHeader.mode = .bottom
|
|
|
- self.collectionComponent.collectionView.parallaxHeader.minimumHeight = 0
|
|
|
+ self.setHeaderCusStackView()
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ func setHeaderCusStackView(){
|
|
|
+ self.collectionComponent.collectionView.parallaxHeader.view = self.cusStackView
|
|
|
+ self.collectionComponent.collectionView.parallaxHeader.height = self.cusStackViewH
|
|
|
+ self.collectionComponent.collectionView.parallaxHeader.mode = .bottom
|
|
|
+ self.collectionComponent.collectionView.parallaxHeader.minimumHeight = 0
|
|
|
+ }
|
|
|
+
|
|
|
override func dealThings() {
|
|
|
NotificationCenter.default.addObserver(self, selector: #selector(vipInfoChanged), name: .kPurchaseDidChanged, object: nil)
|
|
|
updateVipView()
|
|
@@ -315,7 +320,7 @@ extension TSPTPInputVC {
|
|
|
dePrint("collectionViewObserver cusStackView.viewH == \(cusStackView.viewH)")
|
|
|
return cusStackView.viewH
|
|
|
}
|
|
|
- return 454 //promptTextViewH
|
|
|
+ return 454
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -440,6 +445,7 @@ extension TSPTPInputVC {
|
|
|
if kJudgeVip(externalBool: isVip, vc: self) { return } //判断 vip
|
|
|
|
|
|
viewModel.selectedPTPStyleModel.upLoadImage = viewModel.upLoadImage
|
|
|
+ viewModel.selectedPTPStyleModel.upLoadImageUrl = nil
|
|
|
let gennerateVC = TSPTPGeneratorVC(generateStyleModel: viewModel.selectedPTPStyleModel) { [weak self] model in
|
|
|
guard let self = self else { return }
|
|
|
if viewModel.saveModel(model:model) {
|
|
@@ -499,22 +505,42 @@ extension TSPTPInputVC {
|
|
|
|
|
|
kDelayMainShort {
|
|
|
self.updateViewCusStackViewH()
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
|
|
|
func updateViewCusStackViewH() {
|
|
|
- self.collectionComponent.collectionView.parallaxHeader.height = self.cusStackViewH
|
|
|
-
|
|
|
- let newHeight = self.cusStackViewH
|
|
|
- let headerView = self.collectionComponent.collectionView.parallaxHeader.view!
|
|
|
+
|
|
|
+ self.collectionComponent.collectionView.parallaxHeader.updateHeaderHeight(height: self.cusStackViewH)
|
|
|
+
|
|
|
+// self.collectionComponent.collectionView.parallaxHeader.height = self.cusStackViewH
|
|
|
+//
|
|
|
+// let newHeight = self.cusStackViewH
|
|
|
+// let headerView = self.collectionComponent.collectionView.parallaxHeader.view!
|
|
|
+// for constraint in headerView.constraints {
|
|
|
+// if constraint.firstAttribute == .height &&
|
|
|
+// constraint.firstItem as? UIView == headerView &&
|
|
|
+// constraint.secondItem == nil {
|
|
|
+// constraint.constant = newHeight
|
|
|
+// break
|
|
|
+// }
|
|
|
+// }
|
|
|
+ }
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+extension MXParallaxHeader {
|
|
|
+ func updateHeaderHeight(height:CGFloat){
|
|
|
+ self.height = height
|
|
|
+ let headerView = view!
|
|
|
for constraint in headerView.constraints {
|
|
|
if constraint.firstAttribute == .height &&
|
|
|
constraint.firstItem as? UIView == headerView &&
|
|
|
constraint.secondItem == nil {
|
|
|
- constraint.constant = newHeight
|
|
|
+ constraint.constant = height
|
|
|
break
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
}
|