Commit 57f618ab authored by David黄金龙's avatar David黄金龙

长期 按钮的位置处理

parent 9d82c9cc
...@@ -277,18 +277,40 @@ extension YHOtherSelecteItemView { ...@@ -277,18 +277,40 @@ extension YHOtherSelecteItemView {
rightIcon.isHidden = true rightIcon.isHidden = true
longTimeButton.snp.removeConstraints() longTimeButton.snp.removeConstraints()
longTimeButton.isHidden = false longTimeButton.isHidden = false
longTimeButton.snp.remakeConstraints { make in
make.right.equalToSuperview()
make.centerY.equalToSuperview()
make.height.equalTo(32)
make.width.equalTo(43)
}
textField.snp.removeConstraints()
textField.snp.makeConstraints { make in if longTimeButton.isSelected {
make.right.equalTo(longTimeButton.snp.left).offset(-4)
make.bottom.top.left.equalToSuperview() longTimeButton.snp.remakeConstraints { make in
make.centerX.equalToSuperview()
make.centerY.equalToSuperview()
make.height.equalTo(32)
make.width.equalTo(43)
}
textField.snp.removeConstraints()
textField.snp.makeConstraints { make in
make.right.equalToSuperview()
make.bottom.top.left.equalToSuperview()
}
} else {
longTimeButton.snp.remakeConstraints { make in
make.right.equalToSuperview()
make.centerY.equalToSuperview()
make.height.equalTo(32)
make.width.equalTo(43)
}
textField.snp.removeConstraints()
textField.snp.makeConstraints { make in
make.right.equalTo(longTimeButton.snp.left).offset(-4)
make.bottom.top.left.equalToSuperview()
}
} }
} else { } else {
rightIcon.snp.removeConstraints() rightIcon.snp.removeConstraints()
rightIcon.isHidden = false rightIcon.isHidden = false
......
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