| | |
| | | } |
| | | |
| | | extension ChooseOptView:UITableViewDelegate & UITableViewDataSource{ |
| | | |
| | | func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { |
| | | clouse(indexPath.row) |
| | | self.cons_bottom.constant = -JQ_ScreenW |
| | | UIView.animate(withDuration: 0.4) { |
| | | self.alpha = 0 |
| | | self.layoutIfNeeded() |
| | | } completion: { _ in |
| | | self.removeFromSuperview() |
| | | } |
| | | } |
| | | |
| | | func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { |
| | | return items.count |
| | | } |
| | | |
| | | func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { |
| | | var cell = tableView.dequeueReusableCell(withIdentifier: "_cell") |
| | | let cell = tableView.dequeueReusableCell(withIdentifier: "_cell") |
| | | cell!.textLabel?.font = UIFont.systemFont(ofSize: 15, weight: .medium) |
| | | cell!.textLabel?.textColor = UIColor(hexString: "#92A87D") |
| | | cell!.selectionStyle = .none |