Commit 7522d8a9 authored by 刘俊宏's avatar 刘俊宏

订单详情UI调整

parent 1019c1c5
......@@ -7,26 +7,51 @@
//
import UIKit
import ViewAnimator
class ChangeGoodsPriceVC: BaseViewController {
class ChangeGoodsPriceVC: BaseViewController , UITableViewDelegate, UITableViewDataSource {
override func viewDidLoad() {
super.viewDidLoad()
navbar.title = "修改价格"
self.view.addSubview(navbar)
self.view.backgroundColor = UIColor.white
// Do any additional setup after loading the view.
setTabv()
}
var tableV :UITableView!
/*
// MARK: - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
// Get the new view controller using segue.destination.
// Pass the selected object to the new view controller.
}
*/
private let animations = [AnimationType.from(direction: .bottom, offset: 150*glscale)]
func setTabv() {
tableV = UITableView()
view.addSubview(tableV);
tableV.snp.makeConstraints { (make) in
make.left.right.bottom.equalToSuperview()
make.top.equalTo(navbar.snp_bottom)
}
tableV.backgroundColor = UIColor.init(named: "白色背景色")
tableV.delegate = self
tableV.dataSource = self
tableV.separatorStyle = .none
tableV?.register(UINib(nibName: "ChangePriceNormalCell", bundle: nil), forCellReuseIdentifier: "ChangePriceNormalCell")
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return 3
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "ChangePriceNormalCell") as! ChangePriceNormalCell
return cell
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
print(indexPath)
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return 120*glscale
}
}
......@@ -32,6 +32,8 @@ class ShowAlGoodsViewController: BaseViewController , UITableViewDelegate, UITa
tableV.delegate = self
tableV.dataSource = self
tableV.separatorStyle = .none
//不是这个cell-是跟订单详情里面的商品 一样
tableV?.register(UINib(nibName: "ChangePriceNormalCell", bundle: nil), forCellReuseIdentifier: "ChangePriceNormalCell")
}
......
......@@ -66,6 +66,7 @@ class OrderDViewController: BaseViewController {
}
override func viewDidLoad() {
super.viewDidLoad()
loadData()
navbar.title = "订单详情"
self.view.addSubview(navbar)
......
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