Commit eaa52bbe authored by Steven杜宇's avatar Steven杜宇

// 活动

parent 2c336f81
......@@ -126,9 +126,22 @@ class YHActivityListViewController: YHBaseViewController {
tableView.register(UITableViewCell.self, forCellReuseIdentifier: "UITableViewCell")
tableView.register(YHActivityListCell.self, forCellReuseIdentifier: YHActivityListCell.cellReuseIdentifier)
tableView.backgroundView = self.emptyDataTipsView
tableView.tableHeaderView = self.headerView
return tableView
}()
lazy var headerView: UIView = {
let radio = 88.0/335.0
let imgWidth = KScreenWidth - 20.0 * 2
let imgHeight = imgWidth * radio
var height = imgHeight + 16.0
let view = UIView(frame: CGRect(x: 20, y: 0, width: imgWidth, height: height))
let imgV = UIImageView(frame: CGRect(x: 0, y: 16, width: imgWidth, height: imgHeight))
imgV.image = UIImage(named: "activity_header_img")
view.addSubview(imgV)
return view
}()
lazy var emptyDataTipsView: YHEmptyDataView = {
let view = YHEmptyDataView.createView("暂无活动", kEmptyCommonBgName)
view.topMargin = 222
......@@ -300,20 +313,11 @@ extension YHActivityListViewController: UITableViewDelegate, UITableViewDataSour
}
func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
var height: CGFloat = 16.0
if section != 0 {
height = 20.0
}
return height
return 20.0
}
func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
var height: CGFloat = 16.0
if section != 0 {
height = 20.0
}
let view = UIView(frame: CGRect(x: 0, y: 0, width: KScreenWidth - 16.0 * 2, height: height))
let view = UIView(frame: CGRect(x: 0, y: 0, width: KScreenWidth - 16.0 * 2, height: 20))
view.backgroundColor = .clear
return view
}
......
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "活动.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "活动-1.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
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