Commit 58744d89 authored by Steven杜宇's avatar Steven杜宇

// 清单

parent a30c57ec
...@@ -10,6 +10,7 @@ import UIKit ...@@ -10,6 +10,7 @@ import UIKit
import AttributedString import AttributedString
import JXSegmentedView import JXSegmentedView
import Photos import Photos
import GKNavigationBarSwift
class YHMyFileListViewController: YHBaseViewController { class YHMyFileListViewController: YHBaseViewController {
...@@ -59,6 +60,7 @@ class YHMyFileListViewController: YHBaseViewController { ...@@ -59,6 +60,7 @@ class YHMyFileListViewController: YHBaseViewController {
tableView.delegate = self tableView.delegate = self
tableView.dataSource = self tableView.dataSource = self
tableView.tableHeaderView = self.headerView tableView.tableHeaderView = self.headerView
tableView.isHidden = true
return tableView return tableView
}() }()
...@@ -74,11 +76,14 @@ class YHMyFileListViewController: YHBaseViewController { ...@@ -74,11 +76,14 @@ class YHMyFileListViewController: YHBaseViewController {
lazy var headerView:UIView = { lazy var headerView:UIView = {
let myView = UIView(frame: CGRectMake(0, 0, KScreenWidth, 274)) // 是否为刘海屏
bgImgView.frame = CGRectMake(0, 0, KScreenWidth, 264) let isNotchScreen = GKDevice.isNotchedScreen
let top = isNotchScreen ? 0.0 : 24.0
let myView = UIView(frame: CGRectMake(0, 0, KScreenWidth, 274.0-top))
bgImgView.frame = CGRectMake(0, -top, KScreenWidth, 264)
myView.addSubview(bgImgView) myView.addSubview(bgImgView)
self.totalLabel.frame = CGRectMake(26.0, 100+k_Height_NavigationtBarAndStatuBar, KScreenWidth-26*2, 20) self.totalLabel.frame = CGRectMake(26.0, 100+k_Height_NavigationtBarAndStatuBar+top, KScreenWidth-26*2, 20)
bgImgView.addSubview(self.totalLabel) bgImgView.addSubview(self.totalLabel)
// 选择器背景 // 选择器背景
...@@ -146,6 +151,8 @@ class YHMyFileListViewController: YHBaseViewController { ...@@ -146,6 +151,8 @@ class YHMyFileListViewController: YHBaseViewController {
button.layer.cornerRadius = kCornerRadius3 button.layer.cornerRadius = kCornerRadius3
button.clipsToBounds = true button.clipsToBounds = true
button.backgroundColor = .brandMainColor button.backgroundColor = .brandMainColor
button.isUserInteractionEnabled = false
button.layer.opacity = 0.3
button.addTarget(self, action: #selector(clickSaveBtn), for: .touchUpInside) button.addTarget(self, action: #selector(clickSaveBtn), for: .touchUpInside)
return button return button
}() }()
...@@ -497,15 +504,21 @@ extension YHMyFileListViewController { ...@@ -497,15 +504,21 @@ extension YHMyFileListViewController {
self.titles.append(model.ApplicantName) self.titles.append(model.ApplicantName)
} }
} }
self.tableView.isHidden = !isHaveData
self.topSegmentView.items = self.titles self.topSegmentView.items = self.titles
self.segmentView.items = self.titles self.segmentView.items = self.titles
self.showEmptyView(!isHaveData) self.showEmptyView(!isHaveData)
self.saveBtn.isEnabled = true self.saveBtn.isUserInteractionEnabled = true
self.bottomView.layer.opacity = 1.0 self.saveBtn.layer.opacity = 1.0
} else { } else {
self.saveBtn.isUserInteractionEnabled = false
self.saveBtn.layer.opacity = 0.3
YHHUD.flash(message: error?.errorMsg ?? "请求出错") YHHUD.flash(message: error?.errorMsg ?? "请求出错")
} }
self.tableView.reloadData() self.tableView.reloadData()
self.tableView.scrollToBottom()
self.tableView.scrollToTop()
} }
} }
......
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