Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
S
ShorthandMaster
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lmj
ShorthandMaster
Commits
02c88254
Commit
02c88254
authored
Sep 29, 2020
by
lmj_521aiau@163.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
bef972ba
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
4 deletions
+30
-4
SHRecordDetailsVC.swift
ShorthandMaster/Record/SHRecordDetailsVC.swift
+1
-0
SHRecordListViewController.swift
ShorthandMaster/Record/SHRecordListViewController.swift
+29
-4
No files found.
ShorthandMaster/Record/SHRecordDetailsVC.swift
View file @
02c88254
...
...
@@ -56,6 +56,7 @@ class SHRecordDetailsVC: SHBaseViewController {
self
.
view
.
layoutIfNeeded
()
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
)
tableFooterAlertBgView
?
.
addSubview
(
bottomView
!
)
...
...
ShorthandMaster/Record/SHRecordListViewController.swift
View file @
02c88254
...
...
@@ -134,7 +134,7 @@ class SHRecordListViewController: SHBaseViewController {
if
folderModel
.
id
.
length
==
0
{
folderModel
.
createDate
=
nowDate
folderModel
.
modifyDate
=
nowDate
folderModel
.
name
=
"
未知
"
;
folderModel
.
name
=
"
默认笔记本
"
;
folderModel
.
id
=
nowDate
.
milliStamp
for
dic
in
list
.
reversed
(){
...
...
@@ -185,6 +185,30 @@ class SHRecordListViewController: SHBaseViewController {
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
=
[]
for
folder
in
dataSources
{
for
model
in
folder
.
dataSources
{
...
...
@@ -574,7 +598,6 @@ extension SHRecordListViewController: UISearchResultsUpdating, UISearchBarDelega
searchDataSource
.
append
(
folderSearchArr
)
searchDataSource
.
append
(
recordSearchArr
)
}
self
.
tableView
?
.
reloadData
()
if
self
.
searchBarVC
.
isActive
{
maskHintLab
?
.
text
=
"没有找到相关的内容"
...
...
@@ -585,11 +608,12 @@ extension SHRecordListViewController: UISearchResultsUpdating, UISearchBarDelega
self
.
view
.
sendSubviewToBack
(
maskView
)
}
if
self
.
searchBarVC
.
searchBar
.
text
?
.
length
==
0
{
markCountLab
?
.
text
=
"笔记
本总数:
\(
dataSources
.
count
)
"
markCountLab
?
.
text
=
"笔记
总数:
\(
recordsDataSource
.
count
)
"
}
else
{
markCountLab
?
.
text
=
"笔记
本总数:
\(
folder
SearchArr
.
count
)
"
markCountLab
?
.
text
=
"笔记
总数:
\(
record
SearchArr
.
count
)
"
}
}
self
.
tableView
?
.
reloadData
()
}
}
...
...
@@ -632,6 +656,7 @@ extension SHRecordListViewController: UISearchControllerDelegate{
}
func
didDismissSearchController
(
_
searchController
:
UISearchController
){
markCountLab
?
.
text
=
"笔记本总数:
\(
dataSources
.
count
)
"
searchView
.
frame
=
CGRect
(
x
:
8
,
y
:
0
,
width
:
SCREEN_WIDTH
-
16
,
height
:
56
)
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment