Commit 699e8138 authored by lujunye's avatar lujunye

非编辑状态,隐藏添加图片按钮

parent 5251ce27
......@@ -20,8 +20,9 @@ class AddImgCell: UITableViewCell {
var isEdit:Bool?{
willSet{
isEdit = newValue
addBtn.isHidden = !isEdit!
if isAllEditing {
addBtn.isHidden = !isEdit!
}
}
}
@IBAction func btnClick(_ sender: Any) {
......@@ -68,10 +69,19 @@ class AddImgCell: UITableViewCell {
let y = addBtn.frame.minY
let h:CGFloat = addBtn.frame.size.height
if isSingle == false {
addBtn.isHidden = false
if isAllEditing {
addBtn.isHidden = false
}else{
addBtn.isHidden = true
}
scrollView?.isHidden = false
scrollView?.bounces = false
if arr.count < 3 {
if isAllEditing {
addBtn.isHidden = false
}else{
addBtn.isHidden = true
}
scrollView?.contentSize = CGSize(width: arr.count*105, height: 0)
scrollView?.frame = CGRect(x: 15, y: CGFloat(y), width: CGFloat(arr.count)*105, height:h)
addBtnX.constant = (scrollView?.frame.maxX)!
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment