Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
P
PhoneManager
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
Yang
PhoneManager
Commits
0d78e6da
Commit
0d78e6da
authored
Apr 10, 2025
by
yqz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
设置 项目修改
parent
0386184f
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
44 additions
and
28 deletions
+44
-28
SecretViewController.swift
PhoneManager/Class/Session/Secret/SecretViewController.swift
+21
-15
SettingModel.swift
PhoneManager/Class/Session/Settings/Model/SettingModel.swift
+3
-3
SettingViewController.swift
...ssion/Settings/ViewController/SettingViewController.swift
+1
-3
WidgetViewController.swift
PhoneManager/Class/Session/Widget/WidgetViewController.swift
+1
-1
PhotoAndVideoMananger.swift
...l/Class/PhotoAndVideoMananger/PhotoAndVideoMananger.swift
+1
-1
CommonFunc.swift
PhoneManager/Class/Tool/Common/CommonFunc.swift
+15
-3
NSString+Extension.swift
...nager/Class/Tool/Extension.swift/NSString+Extension.swift
+2
-2
No files found.
PhoneManager/Class/Session/Secret/SecretViewController.swift
View file @
0d78e6da
...
...
@@ -107,28 +107,34 @@ class SecretViewController: BaseViewController {
}
private
func
deleteData
()
->
Void
{
var
delName
:[
String
]
=
[]
for
idx
in
selectArray
.
allObjects
{
guard
let
row
:
Int
=
idx
as?
Int
else
{
return
}
let
name
=
dataSource
[
row
]
delName
.
append
(
name
)
}
""
.
delPhotoVideo
(
delName
)
if
selectArray
.
count
>
0
{
selectArray
.
removeAllObjects
()
var
DelCallBlock
=
{
[
weak
self
]
in
guard
let
self
=
self
else
{
return
}
var
delName
:[
String
]
=
[]
for
idx
in
self
.
selectArray
.
allObjects
{
guard
let
row
:
Int
=
idx
as?
Int
else
{
return
}
let
name
=
self
.
dataSource
[
row
]
delName
.
append
(
name
)
}
""
.
delPhotoVideo
(
delName
)
if
self
.
selectArray
.
count
>
0
{
self
.
selectArray
.
removeAllObjects
()
}
Print
(
"删除成功"
)
self
.
dataSource
=
self
.
loadData
()
self
.
bottomm
.
state
=
.
add
}
Print
(
"删除成功"
)
dataSource
=
loadData
()
bottomm
.
state
=
.
add
PMAlert
(
"These photos or videos will be deleted from your private space"
,
[
"Cancel"
,
"Delete"
]
,
{
alert
,
selectidx
in
if
selectidx
==
1
{
DelCallBlock
()
}
alert
.
dismiss
(
animated
:
true
)
})
}
@objc
private
func
lockTouch
(
_
sender
:
UIButton
)
->
Void
{
if
pass
.
count
>
2
{
let
set
=
SecretSetViewController
()
set
.
secretType
=
.
del
set
.
Callback
=
{
bt
in
}
self
.
navigationController
?
.
pushViewController
(
set
,
animated
:
true
)
}
else
{
let
set
=
SecretSetViewController
()
...
...
PhoneManager/Class/Session/Settings/Model/SettingModel.swift
View file @
0d78e6da
...
...
@@ -60,10 +60,10 @@ func getSettingViewInfo() -> [SettingModel] {
[
RowInfoModel
(
imageName
:
"ic_more_setting"
,
title
:
"More Apps From Us"
)]),
SettingModel
(
sectionTitle
:
"UTILITIES"
,
rowInfo
:
[
RowInfoModel
(
imageName
:
"ic_widgets_setting"
,
title
:
"Widgets"
)]),
SettingModel
(
sectionTitle
:
"SECRET SPACE"
,
rowInfo
:
[
RowInfoModel
(
imageName
:
"ic_pin_setting"
,
title
:
"Use PIN"
)]),
//
SettingModel(sectionTitle: "SECRET SPACE",rowInfo: [
//
RowInfoModel(imageName: "ic_pin_setting",title: "Use PIN")]),
SettingModel
(
sectionTitle
:
"STAY IN TOUCH"
,
rowInfo
:
[
RowInfoModel
(
imageName
:
"ic_rate_setting"
,
title
:
"Rate App"
),
RowInfoModel
(
imageName
:
"ic_share_setting"
,
title
:
"Share App"
),
RowInfoModel
(
imageName
:
"ic_ins_setting"
,
title
:
"Follow on Instagram"
)
])]
/*RowInfoModel(imageName: "ic_ins_setting",title: "Follow on Instagram")*/
])]
}
PhoneManager/Class/Session/Settings/ViewController/SettingViewController.swift
View file @
0d78e6da
...
...
@@ -62,7 +62,7 @@ class SettingViewController : BaseViewController , UITableViewDelegate, UITableV
let
model
:
SettingModel
=
modelData
!
[
indexPath
.
section
]
let
detailModel
:
RowInfoModel
=
model
.
rowInfo
[
indexPath
.
row
]
if
indexPath
.
section
==
3
{
if
indexPath
.
section
==
1
3
{
let
cell
:
SettingSwitchCell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"SettingSwitchCell"
,
for
:
indexPath
)
as!
SettingSwitchCell
cell
.
fLabel
.
text
=
detailModel
.
title
cell
.
logoView
.
image
=
UIImage
(
named
:
detailModel
.
imageName
)
...
...
@@ -155,8 +155,6 @@ class SettingViewController : BaseViewController , UITableViewDelegate, UITableV
self
.
navigationController
?
.
pushViewController
(
widget
,
animated
:
true
)
break
case
3
:
break
case
4
:
if
indexPath
.
row
==
0
{
// 评分
self
.
review
()
}
else
if
indexPath
.
row
==
1
{
// 分享
...
...
PhoneManager/Class/Session/Widget/WidgetViewController.swift
View file @
0d78e6da
...
...
@@ -39,7 +39,7 @@ class WidgetViewController: BaseViewController {
var
widgetIdx
=
0
widgetIdx
=
(
widgets
==
.
battery
?
0
:
1
)
*
10
+
widgetMode
widgetAppgourp
.
share
.
PushWidgetData
(
widgetIdx
,
battery
:
Int
(
battery
),
storage
:
Int
(
storage
))
a
lert
(
"Set Widget Successfully"
)
PMA
lert
(
"Set Widget Successfully"
)
}
func
setUI
()
->
Void
{
...
...
PhoneManager/Class/Tool/Class/PhotoAndVideoMananger/PhotoAndVideoMananger.swift
View file @
0d78e6da
...
...
@@ -808,7 +808,7 @@ class SecretPhotoManager: NSObject, PhotoPickerControllerDelegate , CameraContro
func
cameraController
(
_
cameraController
:
HXPhotoPicker
.
CameraController
,
didFinishWithResult
result
:
HXPhotoPicker
.
CameraController
.
Result
,
phAsset
:
PHAsset
?,
location
:
CLLocation
?)
{
switch
result
{
case
.
image
(
let
image
):
image
.
compressImage
(
0.
7
)
{[
weak
self
]
image
in
image
.
compressImage
(
0.
3
)
{[
weak
self
]
image
in
let
data
=
image
.
pngData
()
guard
self
?
.
callback
!=
nil
else
{
return
}
self
?
.
callback
!
(
0
,
data
)
...
...
PhoneManager/Class/Tool/Common/CommonFunc.swift
View file @
0d78e6da
...
...
@@ -55,15 +55,27 @@ func weekFormatter() -> String {
}
func
alert
(
_
msg
:
String
)
->
Void
{
func
PMAlert
(
_
msg
:
String
,
_
action
:[
String
]
=
[]
,
_
complate
:
@escaping(( UIAlertController ,Int)
->
Void
)
=
{
v
,
idx
in
}
)
->
Void
{
let
alertview
=
UIAlertController
(
title
:
nil
,
message
:
msg
,
preferredStyle
:
.
alert
)
guard
let
root
=
cWindow
?
.
rootViewController
else
{
return
}
root
.
present
(
alertview
,
animated
:
true
)
DispatchQueue
.
main
.
asyncAfter
(
deadline
:
.
now
()
+
1
)
{
alertview
.
dismiss
(
animated
:
true
)
if
action
.
count
>
0
{
for
(
i
,
title
)
in
action
.
enumerated
()
{
let
action
=
UIAlertAction
(
title
:
title
,
style
:
.
default
)
{
action
in
complate
(
alertview
,
i
)
}
alertview
.
addAction
(
action
)
}
}
else
{
DispatchQueue
.
main
.
asyncAfter
(
deadline
:
.
now
()
+
1
)
{
alertview
.
dismiss
(
animated
:
true
)
}
}
}
public
func
Print
(
_
items
:
Any
...
)
{
#if DEBUG
...
...
PhoneManager/Class/Tool/Extension.swift/NSString+Extension.swift
View file @
0d78e6da
...
...
@@ -108,7 +108,7 @@ extension String {
pv
(
-
1
,
UIImage
.
Clear
())
return
}
icon
.
resizeAndCompressImage
()
.
compressImage
(
0.3
)
{
image
in
icon
.
compressImage
(
0.2
)
{
image
in
SecretImageCache
.
share
.
saveImageCache
(
self
,
image
)
pv
(
-
1
,
image
)
}
...
...
@@ -121,7 +121,7 @@ extension String {
do
{
let
cgImage
=
try
imageGenerator
.
copyCGImage
(
at
:
CMTime
(
value
:
0
,
timescale
:
1
),
actualTime
:
nil
)
let
icon
=
UIImage
(
cgImage
:
cgImage
);
icon
.
resizeAndCompressImage
(
0.3
)
.
compressImage
(
0.3
)
{
image
in
icon
.
compressImage
(
0.2
)
{
image
in
SecretImageCache
.
share
.
saveImageCache
(
self
,
image
,
CMTimeGetSeconds
(
duration
))
pv
(
CMTimeGetSeconds
(
duration
)
,
image
)
}
...
...
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