Commit b1596fa7 authored by Steven杜宇's avatar Steven杜宇

// 选择地点

parent ccf179f2
......@@ -40,16 +40,15 @@ class YHInfoItemSelectSheetView: UIView {
var isShowDetailOneline:Bool = false {
didSet {
detailLabel.textAlignment = isShowDetailOneline ? .right : .left
// detailLabel.textAlignment = isShowDetailOneline ? .right : .left
detailLabel.numberOfLines = isShowDetailOneline ? 1 : 0
detailLabel.snp.remakeConstraints { make in
make.top.equalTo(16)
make.left.equalTo(titleLabel.snp.right)
make.right.equalTo(arrowImgView.snp.left)
make.bottom.equalTo(-16)
if isShowDetailOneline {
make.height.equalTo(20)
} else {
make.left.equalTo(titleLabel.snp.right)
}
}
self.setNeedsLayout()
......
......@@ -304,9 +304,8 @@ private extension YHSelectApplicantGroupCell {
titleLabel.attributed.text = a+b
collectionView.reloadData()
collectionView.snp.updateConstraints { make in
make.height.equalTo(self.getCollectionViewHeight())
}
let isShowSelectList = self.isShowSelectUserView
self.isShowSelectUserView = isShowSelectList
// 时间选择UI更新
optionsView.selectIndex = 0
......
......@@ -15,6 +15,7 @@ class YHSelectHKPlaceListView: UIView {
return view
}
var selectModel: YHMakeCertificatePlaceModel? = nil
var selectBlock: ((YHMakeCertificatePlaceModel)->())?
var listArr:[YHMakeCertificatePlaceModel] = [] {
......@@ -70,7 +71,6 @@ class YHSelectHKPlaceListView: UIView {
button.contentHorizontalAlignment = .center
button.setTitle("取消", for: .normal)
button.setTitleColor( UIColor.mainTextColor, for: .normal)
button.addTarget(self, action: #selector(dismiss), for: .touchUpInside)
return button
}()
......@@ -80,7 +80,6 @@ class YHSelectHKPlaceListView: UIView {
button.contentHorizontalAlignment = .center
button.setTitle("确定", for: .normal)
button.setTitleColor( UIColor.brandMainColor, for: .normal)
button.addTarget(self, action: #selector(sure), for: .touchUpInside)
return button
}()
......@@ -99,7 +98,10 @@ class YHSelectHKPlaceListView: UIView {
}
@objc func sure() {
if let model = self.selectModel {
selectBlock?(model)
}
self.dismiss()
}
override init(frame: CGRect) {
......@@ -120,6 +122,10 @@ class YHSelectHKPlaceListView: UIView {
whiteContentView.addSubview(lineView)
whiteContentView.addSubview(tableView)
cancelBtn.addTarget(self, action: #selector(dismiss), for: .touchUpInside)
confirmBtn.addTarget(self, action: #selector(sure), for: .touchUpInside)
blackMaskView.snp.makeConstraints { make in
make.edges.equalToSuperview()
}
......@@ -190,6 +196,7 @@ extension YHSelectHKPlaceListView: UITableViewDelegate, UITableViewDataSource {
if 0 <= indexPath.row && indexPath.row < listArr.count {
let model = listArr[indexPath.row]
selectModel = model
for item in listArr {
item.isSelect = (model.id == item.id)
}
......
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