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
08513caa
Commit
08513caa
authored
Sep 25, 2020
by
lmj_521aiau@163.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cloud
parent
7a599916
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
36 additions
and
24 deletions
+36
-24
SHRecordModel.swift
ShorthandMaster/Record/Model/SHRecordModel.swift
+1
-1
SHRecordDetailsVC.swift
ShorthandMaster/Record/SHRecordDetailsVC.swift
+24
-19
SHRecordListViewController.swift
ShorthandMaster/Record/SHRecordListViewController.swift
+6
-0
SHRecordViewController.swift
ShorthandMaster/Record/SHRecordViewController.swift
+3
-2
SHCloudManager.swift
ShorthandMaster/Share/Managers/SHCloudManager.swift
+2
-2
No files found.
ShorthandMaster/Record/Model/SHRecordModel.swift
View file @
08513caa
...
...
@@ -10,7 +10,7 @@ import UIKit
class
SHRecordModel
:
NSObject
{
@objc
var
recordType
:
NSInteger
=
0
@objc
var
record
ing
Type
:
NSInteger
=
0
@objc
var
createDate
:
Date
=
Date
()
@objc
var
modifyDate
:
Date
=
Date
()
...
...
ShorthandMaster/Record/SHRecordDetailsVC.swift
View file @
08513caa
...
...
@@ -68,7 +68,6 @@ class SHRecordDetailsVC: SHBaseViewController {
}
}
}
// currentModel.dataSources[index] = model
}
tableView
?
.
reloadData
()
break
...
...
@@ -110,13 +109,25 @@ class SHRecordDetailsVC: SHBaseViewController {
}
}
@objc
func
editClick
(){
@objc
func
editClick
(
_
restore
:
Bool
){
if
restore
==
false
{
if
currentModel
.
dataSources
.
count
==
0
{
return
}
edit
=
!
edit
}
else
{
edit
=
false
}
if
edit
{
for
model
in
currentModel
.
dataSources
{
model
.
selected
=
false
}
self
.
selectRecordModels
=
[]
self
.
navigationItem
.
rightBarButtonItem
=
UIBarButtonItem
.
init
(
title
:
"完成"
,
style
:
.
done
,
target
:
self
,
action
:
#selector(
editClick
)
)
UIView
.
animate
(
withDuration
:
0.25
)
{
...
...
@@ -128,11 +139,7 @@ class SHRecordDetailsVC: SHBaseViewController {
UIView
.
animate
(
withDuration
:
0.25
)
{
self
.
bottomView
?
.
frame
=
CGRect
.
init
(
x
:
-
self
.
tableFooterView
!.
frame
.
width
,
y
:
0
,
width
:
self
.
tableFooterView
!.
frame
.
width
*
2
,
height
:
self
.
tableFooterView
!.
frame
.
height
)
}
for
model
in
currentModel
.
dataSources
{
model
.
selected
=
false
}
self
.
bottomView
?
.
deleteSelected
=
false
}
self
.
navigationItem
.
rightBarButtonItem
?
.
tintColor
=
UIColor
.
init
(
hexStr
:
"4183F4"
)
self
.
tableView
?
.
reloadData
()
...
...
@@ -176,9 +183,11 @@ extension SHRecordDetailsVC {
for
model
in
self
.
currentModel
.
dataSources
{
model
.
selected
=
false
}
self
.
edit
=
false
self
.
selectRecordModels
=
[]
DispatchQueue
.
main
.
async
{
self
.
editClick
(
true
)
self
.
updateocloudUI
()
// self.tableView?.reloadData()
}
}
}
//MARK:icloud上传Models
...
...
@@ -292,11 +301,7 @@ extension SHRecordDetailsVC {
// }
if
currentModel
.
dataSources
.
count
==
0
{
self
.
navigationItem
.
rightBarButtonItem
=
UIBarButtonItem
.
init
(
title
:
"编辑"
,
style
:
.
done
,
target
:
self
,
action
:
#selector(
editClick
)
)
self
.
navigationItem
.
rightBarButtonItem
?
.
tintColor
=
UIColor
.
init
(
hexStr
:
"4183F4"
)
UIView
.
animate
(
withDuration
:
0.25
)
{
self
.
bottomView
?
.
frame
=
CGRect
.
init
(
x
:
-
self
.
tableFooterView
!.
frame
.
width
,
y
:
0
,
width
:
self
.
tableFooterView
!.
frame
.
width
*
2
,
height
:
self
.
tableFooterView
!.
frame
.
height
)
}
self
.
editClick
(
true
)
self
.
markAlertViewShow
(
false
)
bottomView
?
.
cancel
=
true
}
...
...
ShorthandMaster/Record/SHRecordListViewController.swift
View file @
08513caa
...
...
@@ -44,6 +44,12 @@ class SHRecordListViewController: SHBaseViewController {
override
func
viewWillAppear
(
_
animated
:
Bool
)
{
super
.
viewWillAppear
(
animated
)
// prepareDateSource()
// self.tableView?.reloadData()
}
override
func
viewDidAppear
(
_
animated
:
Bool
)
{
super
.
viewDidAppear
(
animated
)
prepareDateSource
()
self
.
tableView
?
.
reloadData
()
}
...
...
ShorthandMaster/Record/SHRecordViewController.swift
View file @
08513caa
...
...
@@ -478,6 +478,7 @@ class SHRecordViewController: SHBaseViewController{
let
nowDate
=
Date
()
let
model
=
SHRecordModel
()
model
.
recordingType
=
0
model
.
createDate
=
nowDate
model
.
modifyDate
=
nowDate
model
.
address
=
currentAddress
??
""
...
...
ShorthandMaster/Share/Managers/SHCloudManager.swift
View file @
08513caa
...
...
@@ -130,7 +130,7 @@ class SHCloudManager: NSObject {
if
pathFile
==
record
[
"pathFile"
]
{
contains
=
true
let
recordModel
=
SHRecordModel
()
recordModel
.
record
Type
=
record
[
"record
Type"
]
as?
NSInteger
??
0
recordModel
.
record
ingType
=
record
[
"recording
Type"
]
as?
NSInteger
??
0
recordModel
.
address
=
record
[
"address"
]
as?
String
??
""
recordModel
.
pathFile
=
record
[
"pathFile"
]
as?
String
??
""
recordModel
.
rename
=
record
[
"title"
]
as?
String
??
""
...
...
@@ -197,7 +197,7 @@ class SHCloudManager: NSObject {
let
asset
=
CKAsset
.
init
(
fileURL
:
url
)
let
record
=
CKRecord
.
init
(
recordType
:
recordName
)
record
.
setValue
(
recordModel
.
record
Type
,
forKey
:
"record
Type"
)
record
.
setValue
(
recordModel
.
record
ingType
,
forKey
:
"recording
Type"
)
record
.
setValue
(
recordModel
.
rename
,
forKey
:
"title"
)
record
.
setValue
(
recordModel
.
pathFile
,
forKey
:
"pathFile"
)
record
.
setValue
(
recordModel
.
address
,
forKey
:
"address"
)
...
...
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