|
@@ -174,7 +174,11 @@ public class PQStuckPointMaterialController: PQBaseViewController {
|
|
|
view.insertSubview(photoMaterialVc.view, belowSubview: bottomRemindView)
|
|
|
photoMaterialVc.updateFrame(newFrame: CGRect(x: 0, y: (navHeadImageView?.frame.maxY ?? cDevice_iPhoneNavBarAndStatusBarHei) + margin / 2, width: view.frame.width, height: view.frame.height - ((navHeadImageView?.frame.maxY ?? cDevice_iPhoneNavBarAndStatusBarHei) + margin + bottomRemindView.frame.height)))
|
|
|
photoMaterialVc.selectedMaterialHandle = { [weak self] currentMaterialData, selectedPhotoData, selectedTotalDuration, imageCount in
|
|
|
- self?.dealWithSelectedMaterial(materialData: currentMaterialData, selectedDatas: selectedPhotoData, totalDuration: selectedTotalDuration, imageCount: imageCount)
|
|
|
+
|
|
|
+ self?.selectedDataCount = selectedPhotoData.count
|
|
|
+ self?.selectedImageDataCount = imageCount
|
|
|
+
|
|
|
+ self?.dealWithSelectedMaterial(materialData: currentMaterialData, totalDuration: selectedTotalDuration)
|
|
|
|
|
|
self?.dealWithSelectedMaterials(isDissmiss: selectedPhotoData.count <= 0, isChose: true, materialData: currentMaterialData)
|
|
|
}
|
|
@@ -327,10 +331,8 @@ public class PQStuckPointMaterialController: PQBaseViewController {
|
|
|
|
|
|
|
|
|
|
|
|
- func dealWithSelectedMaterial(materialData _: PHAsset?, selectedDatas: [PHAsset]?, totalDuration: Float64, imageCount: Int) {
|
|
|
- selectedDataCount = selectedDatas?.count ?? 0
|
|
|
- selectedImageDataCount = imageCount
|
|
|
- confirmBtn.isSelected = (selectedDataCount > 0 && (imageCount >= 2 || selectedDataCount > imageCount))
|
|
|
+ func dealWithSelectedMaterial(materialData _: PHAsset?, totalDuration: Float64) {
|
|
|
+ confirmBtn.isSelected = (selectedDataCount > 0 && (selectedImageDataCount >= 2 || selectedDataCount > selectedImageDataCount))
|
|
|
if confirmBtn.isSelected {
|
|
|
confirmBtn.backgroundColor = UIColor.hexColor(hexadecimal: PQBFConfig.shared.styleColor.rawValue)
|
|
|
} else {
|