|
@@ -106,7 +106,7 @@ class INIntroduceController: BFBaseViewController {
|
|
stripSwithView.snp.makeConstraints { make in
|
|
stripSwithView.snp.makeConstraints { make in
|
|
make.left.equalTo(backButton!.snp.right).offset(5)
|
|
make.left.equalTo(backButton!.snp.right).offset(5)
|
|
make.top.height.equalTo(backButton!)
|
|
make.top.height.equalTo(backButton!)
|
|
- if assets!.count > 1 {
|
|
|
|
|
|
+ if (assets?.count ?? 0) > 1 {
|
|
make.width.equalTo(cScreenWidth).priority(.high)
|
|
make.width.equalTo(cScreenWidth).priority(.high)
|
|
}else{
|
|
}else{
|
|
make.width.equalTo(0).priority(.high)
|
|
make.width.equalTo(0).priority(.high)
|
|
@@ -115,7 +115,11 @@ class INIntroduceController: BFBaseViewController {
|
|
addMaterialBtn.snp.makeConstraints { make in
|
|
addMaterialBtn.snp.makeConstraints { make in
|
|
make.left.equalTo(stripSwithView.snp.right).offset(-2)
|
|
make.left.equalTo(stripSwithView.snp.right).offset(-2)
|
|
make.top.height.equalTo(backButton!)
|
|
make.top.height.equalTo(backButton!)
|
|
- make.width.equalTo(addMaterialBtn.snp.height)
|
|
|
|
|
|
+ if (assets?.count ?? 0) < 20 {
|
|
|
|
+ make.width.equalTo(addMaterialBtn.snp.height)
|
|
|
|
+ }else {
|
|
|
|
+ make.width.equalTo(0)
|
|
|
|
+ }
|
|
make.right.lessThanOrEqualTo(exportBtn.snp.left).offset(-15)
|
|
make.right.lessThanOrEqualTo(exportBtn.snp.left).offset(-15)
|
|
}
|
|
}
|
|
|
|
|
|
@@ -139,6 +143,14 @@ class INIntroduceController: BFBaseViewController {
|
|
// MARK: - Button action
|
|
// MARK: - Button action
|
|
func updateAsset(_ phAssets:[PHAsset]) {
|
|
func updateAsset(_ phAssets:[PHAsset]) {
|
|
recordScreenVC.fetchMaterial(phAssets)
|
|
recordScreenVC.fetchMaterial(phAssets)
|
|
|
|
+ if recordScreenVC.itemModels.count >= 20 {
|
|
|
|
+ addMaterialBtn.snp.remakeConstraints { make in
|
|
|
|
+ make.left.equalTo(stripSwithView.snp.right).offset(-2)
|
|
|
|
+ make.top.height.equalTo(backButton!)
|
|
|
|
+ make.width.equalTo(0)
|
|
|
|
+ make.right.lessThanOrEqualTo(exportBtn.snp.left).offset(-15)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
resetStripSwithView(recordScreenVC.itemModels.count)
|
|
resetStripSwithView(recordScreenVC.itemModels.count)
|
|
}
|
|
}
|
|
|
|
|