Commit 1bfa84ee authored by 刘俊宏's avatar 刘俊宏

调整订单详情UI底部按钮样式

parent 1450b619
...@@ -95,7 +95,6 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa ...@@ -95,7 +95,6 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
} }
//MARK:--底部视图,根据数据显示 //MARK:--底部视图,根据数据显示
self.btmBtnsTitleArr = self.getOrderBottomBtnTitleStrByStatus(status: (self.dataMdoel?.order_res?.order_status)!, status_d: (self.dataMdoel?.order_res?.order_status_d)!) self.btmBtnsTitleArr = self.getOrderBottomBtnTitleStrByStatus(status: (self.dataMdoel?.order_res?.order_status)!, status_d: (self.dataMdoel?.order_res?.order_status_d)!)
if self.btmBtnsTitleArr.count == 0 { if self.btmBtnsTitleArr.count == 0 {
self.btmViewH.constant = 0 self.btmViewH.constant = 0
self.bottomView.isHidden = true self.bottomView.isHidden = true
...@@ -104,16 +103,34 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa ...@@ -104,16 +103,34 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
self.bottomView.isHidden = false self.bottomView.isHidden = false
self.bottomBgView.isHidden = false self.bottomBgView.isHidden = false
for i in 0 ..< self.btmBtnsTitleArr.count{ for i in 0 ..< self.btmBtnsTitleArr.count{
let title = self.btmBtnsTitleArr[i] let title = self.btmBtnsTitleArr[i]
let width = fullScreenWidth / CGFloat(self.btmBtnsTitleArr.count) let width = fullScreenWidth / CGFloat(self.btmBtnsTitleArr.count)
let btn = UIButton(frame: CGRect(x: CGFloat(i) * width, y: 0, width: width, height: self.bottomView.bounds.size.height)) let btn = UIButton(frame: CGRect(x: CGFloat(i) * width, y: 0, width: width, height: self.bottomView.bounds.size.height))
btn.setTitleColor(UIColor(named: "蓝色字体颜色"), for: .normal) btn.setTitleColor(UIColor(named: "白色背景色"), for: .normal)
btn.titleLabel?.font = UIFont.boldSystemFont(ofSize: 13) btn.titleLabel?.font = UIFont.boldSystemFont(ofSize: 13)
btn.setTitle(title, for: .normal) btn.setTitle(title, for: .normal)
btn.addTarget(self, action: #selector(self.bottomBtnClick(sender:)), for: .touchUpInside) btn.addTarget(self, action: #selector(self.bottomBtnClick(sender:)), for: .touchUpInside)
self.bottomView.addSubview(btn) self.bottomView.addSubview(btn)
self.bottomView.backgroundColor = UIColor.init(named: "按钮渐变色上")
self.bottomBgView.backgroundColor = UIColor.init(named: "按钮渐变色上")
let lineV = UIView()
lineV.backgroundColor = UIColor.init(named: "白色背景色")
self.bottomView.addSubview(lineV)
lineV.snp.makeConstraints { (make) in
make.left.equalTo(btn.snp_right)
make.top.equalTo(12)
make.width.equalTo(1)
make.height.equalTo(self.bottomView.bounds.size.height - 24)
}
} }
} }
if self.dataMdoel?.order_res?.order_status == 2 || self.dataMdoel?.order_res?.order_status == 5{ if self.dataMdoel?.order_res?.order_status == 2 || self.dataMdoel?.order_res?.order_status == 5{
......
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