Commit 02c88254 authored by lmj_521aiau@163.com's avatar lmj_521aiau@163.com

no message

parent bef972ba
...@@ -56,6 +56,7 @@ class SHRecordDetailsVC: SHBaseViewController { ...@@ -56,6 +56,7 @@ class SHRecordDetailsVC: SHBaseViewController {
self.view.layoutIfNeeded() self.view.layoutIfNeeded()
self.view.layoutSubviews() self.view.layoutSubviews()
tableFooterAlertBgView?.clipsToBounds = true
bottomView?.frame = CGRect.init(x: -tableFooterView!.frame.width, y: 0, width: tableFooterView!.frame.width*2, height: tableFooterView!.frame.height) bottomView?.frame = CGRect.init(x: -tableFooterView!.frame.width, y: 0, width: tableFooterView!.frame.width*2, height: tableFooterView!.frame.height)
tableFooterAlertBgView?.addSubview(bottomView!) tableFooterAlertBgView?.addSubview(bottomView!)
......
...@@ -134,7 +134,7 @@ class SHRecordListViewController: SHBaseViewController { ...@@ -134,7 +134,7 @@ class SHRecordListViewController: SHBaseViewController {
if folderModel.id.length == 0 { if folderModel.id.length == 0 {
folderModel.createDate = nowDate folderModel.createDate = nowDate
folderModel.modifyDate = nowDate folderModel.modifyDate = nowDate
folderModel.name = "未知"; folderModel.name = "默认笔记本";
folderModel.id = nowDate.milliStamp folderModel.id = nowDate.milliStamp
for dic in list.reversed(){ for dic in list.reversed(){
...@@ -185,6 +185,30 @@ class SHRecordListViewController: SHBaseViewController { ...@@ -185,6 +185,30 @@ class SHRecordListViewController: SHBaseViewController {
dataSources = topDataSources+dataSources dataSources = topDataSources+dataSources
if dataSources.count == 0 {
let folderModel = SHRecordFolderModel()
folderModel.createDate = nowDate
folderModel.modifyDate = nowDate
folderModel.name = "默认笔记本";
folderModel.id = nowDate.milliStamp
let recordModel = SHRecordModel()
recordModel.recordingType = 0
recordModel.createDate = nowDate
recordModel.modifyDate = nowDate
recordModel.address = "默认笔记"
recordModel.rename = "默认笔记"
recordModel.txt = "默认笔记"
recordModel.pathFile = ""
recordModel.pcmPathFile = ""
recordModel.during = 0
recordModel.imagesPath = []
recordModel.imagesIndex = []
let modelDict = getDictWith(obj: folderModel)
CRUserDefaults.recordList = [modelDict]
}
recordsDataSource = [] recordsDataSource = []
for folder in dataSources{ for folder in dataSources{
for model in folder.dataSources{ for model in folder.dataSources{
...@@ -574,7 +598,6 @@ extension SHRecordListViewController: UISearchResultsUpdating, UISearchBarDelega ...@@ -574,7 +598,6 @@ extension SHRecordListViewController: UISearchResultsUpdating, UISearchBarDelega
searchDataSource.append(folderSearchArr) searchDataSource.append(folderSearchArr)
searchDataSource.append(recordSearchArr) searchDataSource.append(recordSearchArr)
} }
self.tableView?.reloadData()
if self.searchBarVC.isActive{ if self.searchBarVC.isActive{
maskHintLab?.text = "没有找到相关的内容" maskHintLab?.text = "没有找到相关的内容"
...@@ -585,11 +608,12 @@ extension SHRecordListViewController: UISearchResultsUpdating, UISearchBarDelega ...@@ -585,11 +608,12 @@ extension SHRecordListViewController: UISearchResultsUpdating, UISearchBarDelega
self.view.sendSubviewToBack(maskView) self.view.sendSubviewToBack(maskView)
} }
if self.searchBarVC.searchBar.text?.length == 0 { if self.searchBarVC.searchBar.text?.length == 0 {
markCountLab?.text = "笔记本总数:\(dataSources.count)" markCountLab?.text = "笔记总数:\(recordsDataSource.count)"
}else{ }else{
markCountLab?.text = "笔记本总数:\(folderSearchArr.count)" markCountLab?.text = "笔记总数:\(recordSearchArr.count)"
} }
} }
self.tableView?.reloadData()
} }
} }
...@@ -632,6 +656,7 @@ extension SHRecordListViewController: UISearchControllerDelegate{ ...@@ -632,6 +656,7 @@ extension SHRecordListViewController: UISearchControllerDelegate{
} }
func didDismissSearchController(_ searchController: UISearchController){ func didDismissSearchController(_ searchController: UISearchController){
markCountLab?.text = "笔记本总数:\(dataSources.count)"
searchView.frame = CGRect(x: 8, y: 0, width: SCREEN_WIDTH-16, height: 56) searchView.frame = CGRect(x: 8, y: 0, width: SCREEN_WIDTH-16, height: 56)
} }
......
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