Commit c434d6ef authored by David黄金龙's avatar David黄金龙

我的清单 UI布局

parent 3ce1f08e
......@@ -33,8 +33,15 @@ class YHFileListViewController: YHBaseViewController {
private lazy var myScrollView : UIScrollView = {
let view = UIScrollView()
view.backgroundColor = .red
return view
}()
private lazy var myContentView : UIView = {
let view = UIView()
view.backgroundColor = .yellow
view.layer.cornerRadius = kCornerRadius6
view.clipsToBounds = true
return view
}()
......@@ -79,25 +86,60 @@ extension YHFileListViewController {
gk_navBarAlpha = 1.0
gk_navBackgroundColor = .white
view.addSubview(topBkg)
topBkg.snp.makeConstraints { make in
make.top.equalToSuperview().offset(k_Height_NavigationtBarAndStatuBar)
make.left.right.equalToSuperview()
make.height.equalTo(312)
}
view.addSubview(bottomView)
bottomView.snp.makeConstraints { make in
make.left.right.bottom.equalToSuperview()
make.height.equalTo(YHFileListBottomView.viewH)
}
bottomView.block = { flag in
if flag == 1 {
printLog("生成清单")
}
}
view.addSubview(myScrollView)
myScrollView.snp.makeConstraints { make in
make.top.equalToSuperview().offset(k_Height_NavigationtBarAndStatuBar)
make.left.right.equalToSuperview()
make.bottom.equalTo(bottomView.snp.top)
}
myScrollView.addSubview(topBkg)
topBkg.snp.makeConstraints { make in
make.top.equalToSuperview()
make.left.equalToSuperview()
make.width.equalTo(KScreenWidth)
make.height.equalTo(312)
}
myScrollView.addSubview(myContentView)
myContentView.snp.makeConstraints { make in
make.top.equalTo(217)
make.left.equalTo(kMargin)
make.width.equalTo(KScreenWidth - 2*kMargin)
make.height.equalTo(1700) //for test hjl
// make.bottom.equalToSuperview().offset(-50)
}
let footLable = UILabel()
footLable.text = "*感谢您对银河移民的信赖,以上信息均用于香港优才签证申 请银河移民承诺对您所提供的信息将绝对保密"
footLable.textColor = .white
footLable.font = UIFont.PFSC_R(ofSize: 12)
footLable.numberOfLines = 0
footLable.lineBreakMode = .byWordWrapping
myScrollView.addSubview(footLable)
footLable.snp.makeConstraints { make in
make.top.equalTo(myContentView.snp.bottom).offset(29)
make.left.equalTo(28)
make.width.equalTo(KScreenWidth - 2*28)
make.bottom.equalToSuperview().offset(-41)
}
myScrollView.layoutIfNeeded()
printLog(myScrollView.contentSize)
return
}
}
......@@ -56,7 +56,7 @@ private extension YHFileListBottomView {
let button = UIButton(type: .custom)
button.titleLabel?.font = UIFont.PFSC_M(ofSize: 15)
button.contentHorizontalAlignment = .center
button.setTitle("生成清单", for: .normal)
button.setTitle("保存清单图", for: .normal)
button.setTitleColor(.white, for: .normal)
button.layer.cornerRadius = kCornerRadius6
button.clipsToBounds = true
......
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