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

// 清单

parent a30c57ec
......@@ -10,6 +10,7 @@ import UIKit
import AttributedString
import JXSegmentedView
import Photos
import GKNavigationBarSwift
class YHMyFileListViewController: YHBaseViewController {
......@@ -59,6 +60,7 @@ class YHMyFileListViewController: YHBaseViewController {
tableView.delegate = self
tableView.dataSource = self
tableView.tableHeaderView = self.headerView
tableView.isHidden = true
return tableView
}()
......@@ -74,11 +76,14 @@ class YHMyFileListViewController: YHBaseViewController {
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)
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)
// 选择器背景
......@@ -146,6 +151,8 @@ class YHMyFileListViewController: YHBaseViewController {
button.layer.cornerRadius = kCornerRadius3
button.clipsToBounds = true
button.backgroundColor = .brandMainColor
button.isUserInteractionEnabled = false
button.layer.opacity = 0.3
button.addTarget(self, action: #selector(clickSaveBtn), for: .touchUpInside)
return button
}()
......@@ -497,15 +504,21 @@ extension YHMyFileListViewController {
self.titles.append(model.ApplicantName)
}
}
self.tableView.isHidden = !isHaveData
self.topSegmentView.items = self.titles
self.segmentView.items = self.titles
self.showEmptyView(!isHaveData)
self.saveBtn.isEnabled = true
self.bottomView.layer.opacity = 1.0
self.saveBtn.isUserInteractionEnabled = true
self.saveBtn.layer.opacity = 1.0
} else {
self.saveBtn.isUserInteractionEnabled = false
self.saveBtn.layer.opacity = 0.3
YHHUD.flash(message: error?.errorMsg ?? "请求出错")
}
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