Commit 7dd2d36e authored by Steven杜宇's avatar Steven杜宇

// 学历资格显示

parent dca6268e
...@@ -28,11 +28,13 @@ class YHEducationDetailVC: YHBaseViewController { ...@@ -28,11 +28,13 @@ class YHEducationDetailVC: YHBaseViewController {
lazy var tableView: UITableView = { lazy var tableView: UITableView = {
let tableView = UITableView(frame:.zero, style:.plain) let tableView = UITableView(frame:.zero, style:.grouped)
if #available(iOS 11.0, *) { if #available(iOS 11.0, *) {
tableView.contentInsetAdjustmentBehavior = .never tableView.contentInsetAdjustmentBehavior = .never
} }
tableView.estimatedSectionHeaderHeight = 14.0
tableView.estimatedSectionFooterHeight = 1.0
tableView.showsVerticalScrollIndicator = false tableView.showsVerticalScrollIndicator = false
tableView.backgroundColor = UIColor(hexString:"#F8F8F8") tableView.backgroundColor = UIColor(hexString:"#F8F8F8")
tableView.separatorStyle = .none tableView.separatorStyle = .none
...@@ -54,6 +56,7 @@ class YHEducationDetailVC: YHBaseViewController { ...@@ -54,6 +56,7 @@ class YHEducationDetailVC: YHBaseViewController {
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()
self.gk_navTitle = "学历".local self.gk_navTitle = "学历".local
self.gk_navigationBar.backgroundColor = .white
view.backgroundColor = UIColor(hexString:"#F8F8F8") view.backgroundColor = UIColor(hexString:"#F8F8F8")
createUI() createUI()
} }
...@@ -266,12 +269,13 @@ extension YHEducationDetailVC : UITableViewDelegate, UITableViewDataSource { ...@@ -266,12 +269,13 @@ extension YHEducationDetailVC : UITableViewDelegate, UITableViewDataSource {
return UITableView.automaticDimension return UITableView.automaticDimension
} }
func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
return UIView() return UIView()
} }
private func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> CGFloat { private func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> CGFloat {
return 14.0 return 14.0
} }
......
...@@ -25,11 +25,13 @@ class YHEducationInfoListVC: YHBaseViewController { ...@@ -25,11 +25,13 @@ class YHEducationInfoListVC: YHBaseViewController {
lazy var tableView: UITableView = { lazy var tableView: UITableView = {
let tableView = UITableView(frame:.zero, style:.plain) let tableView = UITableView(frame:.zero, style:.grouped)
if #available(iOS 11.0, *) { if #available(iOS 11.0, *) {
tableView.contentInsetAdjustmentBehavior = .never tableView.contentInsetAdjustmentBehavior = .never
} }
tableView.estimatedSectionHeaderHeight = 14.0
tableView.estimatedSectionFooterHeight = 1.0
tableView.showsVerticalScrollIndicator = false tableView.showsVerticalScrollIndicator = false
tableView.backgroundColor = UIColor(hexString:"#F8F8F8") tableView.backgroundColor = UIColor(hexString:"#F8F8F8")
tableView.separatorStyle = .none tableView.separatorStyle = .none
...@@ -53,6 +55,7 @@ class YHEducationInfoListVC: YHBaseViewController { ...@@ -53,6 +55,7 @@ class YHEducationInfoListVC: YHBaseViewController {
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()
self.gk_navTitle = "学历/专业资格填写".local self.gk_navTitle = "学历/专业资格填写".local
self.gk_navigationBar.backgroundColor = .white
view.backgroundColor = UIColor(hexString:"#F8F8F8") view.backgroundColor = UIColor(hexString:"#F8F8F8")
createUI() createUI()
} }
...@@ -407,10 +410,22 @@ extension YHEducationInfoListVC : UITableViewDelegate, UITableViewDataSource { ...@@ -407,10 +410,22 @@ extension YHEducationInfoListVC : UITableViewDelegate, UITableViewDataSource {
return UIView() return UIView()
} }
private func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> CGFloat { func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
return UIView()
}
private func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> CGFloat {
return 14.0 return 14.0
} }
private func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> CGFloat {
if section == items.count-1 {
return 14.0
}
return 1.0
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
let arr = items[indexPath.section] let arr = items[indexPath.section]
......
...@@ -27,11 +27,13 @@ class YHQualificationDetailVC: YHBaseViewController { ...@@ -27,11 +27,13 @@ class YHQualificationDetailVC: YHBaseViewController {
lazy var tableView: UITableView = { lazy var tableView: UITableView = {
let tableView = UITableView(frame:.zero, style:.plain) let tableView = UITableView(frame:.zero, style:.grouped)
if #available(iOS 11.0, *) { if #available(iOS 11.0, *) {
tableView.contentInsetAdjustmentBehavior = .never tableView.contentInsetAdjustmentBehavior = .never
} }
tableView.estimatedSectionHeaderHeight = 14.0
tableView.estimatedSectionFooterHeight = 1.0
tableView.showsVerticalScrollIndicator = false tableView.showsVerticalScrollIndicator = false
tableView.backgroundColor = UIColor(hexString:"#F8F8F8") tableView.backgroundColor = UIColor(hexString:"#F8F8F8")
tableView.separatorStyle = .none tableView.separatorStyle = .none
...@@ -53,6 +55,7 @@ class YHQualificationDetailVC: YHBaseViewController { ...@@ -53,6 +55,7 @@ class YHQualificationDetailVC: YHBaseViewController {
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()
self.gk_navTitle = "专业资格及会员资格".local self.gk_navTitle = "专业资格及会员资格".local
self.gk_navigationBar.backgroundColor = .white
view.backgroundColor = UIColor(hexString:"#F8F8F8") view.backgroundColor = UIColor(hexString:"#F8F8F8")
createUI() createUI()
} }
...@@ -239,12 +242,12 @@ extension YHQualificationDetailVC : UITableViewDelegate, UITableViewDataSource { ...@@ -239,12 +242,12 @@ extension YHQualificationDetailVC : UITableViewDelegate, UITableViewDataSource {
return UITableView.automaticDimension return UITableView.automaticDimension
} }
func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? { func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
return UIView() return UIView()
} }
private func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> CGFloat { private func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> CGFloat {
return 14.0 return 14.0
} }
......
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