| | |
| | | static func show(items:[String],clouse:@escaping (Int)->Void){ |
| | | let alertView = CommonAlertSheetView.jq_loadNibView() |
| | | alertView.frame = sceneDelegate?.window?.frame ?? .zero |
| | | alertView.cons_tableHei.constant = CGFloat(items.count * 50) |
| | | alertView.cons_tableHei.constant = CGFloat(items.count * 56) |
| | | sceneDelegate?.window?.addSubview(alertView) |
| | | alertView.cons_viewBottom.constant = 0 |
| | | alertView.items = items |
| | |
| | | |
| | | override func layoutSubviews() { |
| | | super.layoutSubviews() |
| | | let totalH = Double(items.count * 50) + UIDevice.jq_safeEdges.bottom + 50 |
| | | let totalH = Double(items.count * 56) + UIDevice.jq_safeEdges.bottom + 56 |
| | | view_container.jq_addCorners(corner: [.topLeft,.topRight], radius: 20,height: totalH) |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { |
| | | return 50 |
| | | return 56 |
| | | } |
| | | } |
| | | |
| | |
| | | selectionStyle = .none |
| | | label_content = UILabel() |
| | | label_content.text = "123" |
| | | label_content.font = UIFont.systemFont(ofSize: 16, weight: .medium) |
| | | label_content.textColor = .black.withAlphaComponent(0.8) |
| | | label_content.font = UIFont.systemFont(ofSize: 15, weight: .medium) |
| | | label_content.textColor = UIColor(hexString: "#6B6B6B") |
| | | |
| | | contentView.addSubview(label_content) |
| | | label_content.snp.makeConstraints { make in |
| | |
| | | } |
| | | |
| | | let lineView = UIView() |
| | | lineView.backgroundColor = UIColor(hexStr: "#DBDBE7") |
| | | lineView.backgroundColor = UIColor(hexStr: "#979797").withAlphaComponent(0.05) |
| | | contentView.addSubview(lineView) |
| | | lineView.snp.makeConstraints { make in |
| | | make.left.equalTo(15) |