Commit ca5267f2 authored by lujunye's avatar lujunye

修复新增店铺选择显示bug

parent 96ff636e
......@@ -20,6 +20,11 @@ class GLAlertTbAddView: UIView,UITableViewDelegate,UITableViewDataSource,GLAlert
}else{
datas.remove(at: tag)
}
if datas.count == 1 {
center_view_height.constant = 165
}else{
center_view_height.constant = 230
}
list_tableview.reloadData()
}
......@@ -42,6 +47,7 @@ class GLAlertTbAddView: UIView,UITableViewDelegate,UITableViewDataSource,GLAlert
}
var centers:Array<getDbtShopDataModel> = []
var datas:Array<String> = [""]
@IBOutlet weak var center_view_height: NSLayoutConstraint!
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
if tableView == list_tableview {
......@@ -79,11 +85,13 @@ class GLAlertTbAddView: UIView,UITableViewDelegate,UITableViewDataSource,GLAlert
let model = centers[indexPath.row]
cell.titleLbl.text = model.shop_name
let str = datas[idx] as! String
if indexPath.row == idx && str.count > 0{
if str.count > 0{
if cell.titleLbl.text == str {
cell.selectBtn.isSelected = true
}else{
cell.selectBtn.isSelected = false
}
}
return cell
}
......
......@@ -13,6 +13,7 @@
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="GLAlertTbAddView" customModule="TestClass" customModuleProvider="target">
<connections>
<outlet property="bottom_tableview" destination="0V2-BU-sF9" id="iJ3-vo-ZiD"/>
<outlet property="center_view_height" destination="9E4-JF-1gj" id="UwA-pb-rXY"/>
<outlet property="list_tableview" destination="ai3-h9-DLi" id="3Wi-eZ-2xQ"/>
</connections>
</placeholder>
......
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