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
6e9fa4c3
Commit
6e9fa4c3
authored
May 20, 2025
by
yqz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
111
parent
e8a0ce1e
Hide whitespace changes
Inline
Side-by-side
Showing
40 changed files
with
414 additions
and
168 deletions
+414
-168
BaseNavViewController.swift
...ger/Class/Base/ViewController/BaseNavViewController.swift
+4
-0
AdvTipDeleteView.swift
...ager/Class/Page/Advertisement/View/AdvTipDeleteView.swift
+5
-4
AdvTipSelectView.swift
...ager/Class/Page/Advertisement/View/AdvTipSelectView.swift
+36
-34
ChargeInfoViewController.swift
...ass/Page/Charge/Controller/ChargeInfoViewController.swift
+12
-7
CompressController.swift
...r/Class/Page/Compress/Controller/CompressController.swift
+13
-6
ContactAllViewController.swift
...ss/Page/Contact/Controller/ContactAllViewController.swift
+1
-1
ContactBackupDetailViewController.swift
...ontact/Controller/ContactBackupDetailViewController.swift
+4
-0
ContactBackupViewController.swift
...Page/Contact/Controller/ContactBackupViewController.swift
+8
-0
ContactAllView.swift
...eManager/Class/Page/Contact/View/All/ContactAllView.swift
+43
-19
ContactBackUpNormalView.swift
...Class/Page/Contact/View/Bac/ContactBackUpNormalView.swift
+40
-4
ContactBackupAlertView.swift
...ontact/View/Common/AlertView/ContactBackupAlertView.swift
+12
-4
ContactDeleteAlertView.swift
...ontact/View/Common/AlertView/ContactDeleteAlertView.swift
+12
-3
ContactMergeAlertView.swift
...Contact/View/Common/AlertView/ContactMergeAlertView.swift
+11
-3
ContactDupPreNormalView.swift
...Class/Page/Contact/View/Dup/ContactDupPreNormalView.swift
+9
-1
MergeButtonView.swift
...Manager/Class/Page/Contact/View/Dup/MergeButtonView.swift
+27
-8
ContactNormalIncomView.swift
.../Class/Page/Contact/View/Inc/ContactNormalIncomView.swift
+13
-2
HomeInfoViewController.swift
...r/Class/Page/Home/Controller/HomeInfoViewController.swift
+12
-4
HomePhotosDetailViewController.swift
...Page/Home/Controller/HomePhotosDetailViewController.swift
+10
-2
HomeVideoDetailController.swift
...lass/Page/Home/Controller/HomeVideoDetailController.swift
+11
-3
HomeViewController.swift
...nager/Class/Page/Home/Controller/HomeViewController.swift
+4
-3
ResourceFilterBoxView.swift
...eManager/Class/Page/Home/View/ResourceFilterBoxView.swift
+3
-3
MaintaiDetailViewController.swift
...ss/Page/Keep/Controller/MaintaiDetailViewController.swift
+4
-1
MaintainViewListController.swift
...ass/Page/Keep/Controller/MaintainViewListController.swift
+4
-1
MaintaiTipsAlertView.swift
PhoneManager/Class/Page/Keep/View/MaintaiTipsAlertView.swift
+11
-2
MaintaiTipsAlertView.xib
PhoneManager/Class/Page/Keep/View/MaintaiTipsAlertView.xib
+2
-2
CustomRateView.swift
PhoneManager/Class/Page/Public/Rate/CustomRateView.swift
+17
-9
CustomRateView.xib
PhoneManager/Class/Page/Public/Rate/CustomRateView.xib
+1
-1
DelSuccessViewController.swift
...lass/Page/Public/celebrate/DelSuccessViewController.swift
+6
-1
PMShowImgVideoController.swift
...eManager/Class/Page/Secret/PMShowImgVideoController.swift
+19
-7
SecretSetViewController.swift
PhoneManager/Class/Page/Secret/SecretSetViewController.swift
+1
-0
SettingViewHeaderCell.swift
...ager/Class/Page/Settings/View/SettingViewHeaderCell.swift
+2
-2
SettingViewController.swift
.../Page/Settings/ViewController/SettingViewController.swift
+13
-10
EmailFilterController.swift
...lass/Session/Email/Controller/EmailFilterController.swift
+7
-4
EmailKeywordController.swift
...ass/Session/Email/Controller/EmailKeywordController.swift
+1
-0
EmailCleanListView.swift
...Manager/Class/Session/Email/View/EmailCleanListView.swift
+10
-5
EmailContentView.swift
PhoneManager/Class/Session/Email/View/EmailContentView.swift
+10
-5
SystemCommentManager.swift
...ool/Class/SystemCommentManager/SystemCommentManager.swift
+10
-5
Common.swift
PhoneManager/Class/Tool/Common/Common.swift
+2
-0
UIView+Extension.swift
...anager/Class/Tool/Extension.swift/ UIView+Extension.swift
+2
-2
Info.plist
PhoneManager/Info.plist
+2
-0
No files found.
PhoneManager/Class/Base/ViewController/BaseNavViewController.swift
View file @
6e9fa4c3
...
@@ -124,6 +124,10 @@ class BaseNavViewController:UINavigationController ,UIGestureRecognizerDelegate
...
@@ -124,6 +124,10 @@ class BaseNavViewController:UINavigationController ,UIGestureRecognizerDelegate
super
.
pushViewController
(
viewController
,
animated
:
animated
)
super
.
pushViewController
(
viewController
,
animated
:
animated
)
}
}
override
var
childForStatusBarStyle
:
UIViewController
?{
return
topViewController
}
deinit
{
deinit
{
NotificationCenter
.
default
.
removeObserver
(
self
)
NotificationCenter
.
default
.
removeObserver
(
self
)
...
...
PhoneManager/Class/Page/Advertisement/View/AdvTipDeleteView.swift
View file @
6e9fa4c3
...
@@ -135,7 +135,7 @@ class AdvTipDeleteView : UIView {
...
@@ -135,7 +135,7 @@ class AdvTipDeleteView : UIView {
override
init
(
frame
:
CGRect
)
{
override
init
(
frame
:
CGRect
)
{
super
.
init
(
frame
:
frame
)
super
.
init
(
frame
:
frame
)
self
.
backgroundColor
=
UIColor
(
red
:
0
,
green
:
0
,
blue
:
0
,
alpha
:
0.5000
)
//
self.backgroundColor = UIColor(red: 0, green: 0, blue: 0, alpha: 0.5000)
self
.
addSubview
(
self
.
tipView
)
self
.
addSubview
(
self
.
tipView
)
self
.
tipView
.
addSubview
(
self
.
closeButton
)
self
.
tipView
.
addSubview
(
self
.
closeButton
)
self
.
tipView
.
addSubview
(
self
.
tipTitle
)
self
.
tipView
.
addSubview
(
self
.
tipTitle
)
...
@@ -196,7 +196,7 @@ class AdvTipDeleteView : UIView {
...
@@ -196,7 +196,7 @@ class AdvTipDeleteView : UIView {
}
}
override
func
removeFromSuperview
()
{
override
func
removeFromSuperview
()
{
UIView
.
animate
(
withDuration
:
0.2
)
{
UIView
.
animate
(
withDuration
:
AniDuration
)
{
// 更新约束
// 更新约束
self
.
backgroundColor
=
.
clear
self
.
backgroundColor
=
.
clear
self
.
centerYConstraint
?
.
update
(
offset
:
self
.
height
+
205
)
self
.
centerYConstraint
?
.
update
(
offset
:
self
.
height
+
205
)
...
@@ -278,9 +278,9 @@ extension AdvTipDeleteView : UICollectionViewDataSource, UICollectionViewDelegat
...
@@ -278,9 +278,9 @@ extension AdvTipDeleteView : UICollectionViewDataSource, UICollectionViewDelegat
}
}
// 先显示背景,然后延迟显示弹框
// 先显示背景,然后延迟显示弹框
DispatchQueue
.
main
.
asyncAfter
(
deadline
:
.
now
()
+
0.1
)
{
DispatchQueue
.
main
.
asyncAfter
(
deadline
:
.
now
()
+
0.
0
1
)
{
UIView
.
animate
(
withDuration
:
0.2
)
{
UIView
.
animate
(
withDuration
:
AniDuration
)
{
// 更新约束
// 更新约束
self
.
centerYConstraint
?
.
update
(
offset
:
0
)
self
.
centerYConstraint
?
.
update
(
offset
:
0
)
self
.
layoutIfNeeded
()
self
.
layoutIfNeeded
()
...
@@ -322,6 +322,7 @@ extension AdvTipDeleteView : UICollectionViewDataSource, UICollectionViewDelegat
...
@@ -322,6 +322,7 @@ extension AdvTipDeleteView : UICollectionViewDataSource, UICollectionViewDelegat
@objc
func
closeButtonAction
(){
@objc
func
closeButtonAction
(){
deleteButtonClickCallback
(
false
,
-
10
)
self
.
removeFromSuperview
()
self
.
removeFromSuperview
()
}
}
...
...
PhoneManager/Class/Page/Advertisement/View/AdvTipSelectView.swift
View file @
6e9fa4c3
...
@@ -29,14 +29,10 @@ struct AdvTipSelectModel {
...
@@ -29,14 +29,10 @@ struct AdvTipSelectModel {
}
}
class
AdvTipSelectView
:
UIView
{
class
AdvTipSelectView
:
UIView
Controller
{
var
selectClickCallback
:
(
Bool
)
->
Void
=
{
isSrue
in
}
var
selectClickCallback
:
(
Bool
)
->
Void
=
{
isSrue
in
}
required
init
?(
coder
:
NSCoder
)
{
fatalError
(
"init(coder:) has not been implemented"
)
}
var
selectType
:
TipSelectType
?
var
selectType
:
TipSelectType
?
...
@@ -53,8 +49,6 @@ class AdvTipSelectView : UIView {
...
@@ -53,8 +49,6 @@ class AdvTipSelectView : UIView {
return
view
return
view
}()
}()
lazy
var
closeButton
:
UIButton
=
{
lazy
var
closeButton
:
UIButton
=
{
let
view
=
UIButton
(
type
:
.
custom
)
let
view
=
UIButton
(
type
:
.
custom
)
view
.
setImage
(
UIImage
(
named
:
"icon_close_pop_purple"
),
for
:
.
normal
)
view
.
setImage
(
UIImage
(
named
:
"icon_close_pop_purple"
),
for
:
.
normal
)
...
@@ -121,12 +115,14 @@ class AdvTipSelectView : UIView {
...
@@ -121,12 +115,14 @@ class AdvTipSelectView : UIView {
}()
}()
override
init
(
frame
:
CGRect
)
{
override
func
viewDidLoad
()
{
super
.
init
(
frame
:
frame
)
super
.
viewDidLoad
()
self
.
view
.
backgroundColor
=
.
clear
self
.
backgroundColor
=
UIColor
(
red
:
0
,
green
:
0
,
blue
:
0
,
alpha
:
0.5000
)
setup
()
}
self
.
addSubview
(
self
.
tipView
)
func
setup
()
->
Void
{
self
.
view
.
addSubview
(
self
.
tipView
)
self
.
tipView
.
addSubview
(
self
.
closeButton
)
self
.
tipView
.
addSubview
(
self
.
closeButton
)
self
.
tipView
.
addSubview
(
self
.
logoView
)
self
.
tipView
.
addSubview
(
self
.
logoView
)
self
.
tipView
.
addSubview
(
self
.
tipTitle
)
self
.
tipView
.
addSubview
(
self
.
tipTitle
)
...
@@ -142,7 +138,8 @@ class AdvTipSelectView : UIView {
...
@@ -142,7 +138,8 @@ class AdvTipSelectView : UIView {
make
.
centerX
.
equalToSuperview
()
make
.
centerX
.
equalToSuperview
()
make
.
width
.
equalTo
(
345
)
make
.
width
.
equalTo
(
345
)
make
.
height
.
equalTo
(
432
)
make
.
height
.
equalTo
(
432
)
centerYConstraint
=
make
.
centerY
.
equalToSuperview
()
.
offset
(
self
.
height
+
220
)
.
constraint
make
.
centerY
.
equalToSuperview
()
// centerYConstraint = make.centerY.equalToSuperview().offset(self.height + 220).constraint
}
}
self
.
closeButton
.
snp
.
makeConstraints
{
make
in
self
.
closeButton
.
snp
.
makeConstraints
{
make
in
...
@@ -184,25 +181,28 @@ class AdvTipSelectView : UIView {
...
@@ -184,25 +181,28 @@ class AdvTipSelectView : UIView {
}
}
// 先显示背景,然后延迟显示弹框
// 先显示背景,然后延迟显示弹框
DispatchQueue
.
main
.
asyncAfter
(
deadline
:
.
now
()
+
0.
1
)
{
// DispatchQueue.main.asyncAfter(deadline: .now() + 0.0
1) {
UIView
.
animate
(
withDuration
:
0.1
)
{
// UIView.animate(withDuration: 0.4
) {
// 更新约束
//
// 更新约束
self
.
centerYConstraint
?
.
update
(
offset
:
0
)
//
self.centerYConstraint?.update(offset: 0)
self
.
layoutIfNeeded
()
//
self.layoutIfNeeded()
}
//
}
}
//
}
}
}
override
func
removeFromSuperview
()
{
// override func removeFromSuperview() {
UIView
.
animate
(
withDuration
:
0.2
)
{
// UIView.animate(withDuration: AniDuration) {
// 更新约束
// // 更新约束
self
.
backgroundColor
=
.
clear
//// self.backgroundColor = .clear
self
.
centerYConstraint
?
.
update
(
offset
:
self
.
height
+
220
)
//// self.centerYConstraint?.update(offset: self.height + 220)
self
.
layoutIfNeeded
()
//// self.layoutIfNeeded()
}
completion
:
{
_
in
// var frame = self.bounds
super
.
removeFromSuperview
()
// frame.origin.y = frame.height
}
// self.frame = frame
}
// }completion: { _ in
// super.removeFromSuperview()
// }
// }
}
}
...
@@ -238,14 +238,16 @@ extension AdvTipSelectView{
...
@@ -238,14 +238,16 @@ extension AdvTipSelectView{
self
.
secondButton
.
setTitle
(
self
.
tipSelectModel
?
.
deleteLessText
,
for
:
.
normal
)
self
.
secondButton
.
setTitle
(
self
.
tipSelectModel
?
.
deleteLessText
,
for
:
.
normal
)
}
}
@objc
func
closeButtonAction
(){
@objc
func
closeButtonAction
(){
self
.
removeFromSuperview
()
self
.
selectClickCallback
(
false
)
// self.removeFromSuperview()
}
}
@objc
func
buttonSureSelectAction
(){
@objc
func
buttonSureSelectAction
(){
self
.
selectClickCallback
(
true
)
self
.
selectClickCallback
(
true
)
self
.
removeFromSuperview
()
//
self.removeFromSuperview()
}
}
@objc
func
buttonCancelSelectAction
(){
@objc
func
buttonCancelSelectAction
(){
self
.
removeFromSuperview
()
self
.
selectClickCallback
(
false
)
// self.removeFromSuperview()
}
}
}
}
PhoneManager/Class/Page/Charge/Controller/ChargeInfoViewController.swift
View file @
6e9fa4c3
...
@@ -67,15 +67,20 @@ class ChargeInfoViewController:BaseViewController {
...
@@ -67,15 +67,20 @@ class ChargeInfoViewController:BaseViewController {
// 再次判断下
// 再次判断下
if
IAPManager
.
share
.
isSubscribed
==
false
{
if
IAPManager
.
share
.
isSubscribed
==
false
{
// 弹出提示框
// 弹出提示框
let
alertView
=
AdvTipSelectView
(
frame
:
self
.
view
.
bounds
)
let
alertView
=
AdvTipSelectView
()
alertView
.
selectType
=
.
selectTypeSetAnimation
alertView
.
selectType
=
.
selectTypeSetAnimation
alertView
.
getOtherInfoByType
()
alertView
.
getOtherInfoByType
()
alertView
.
modalPresentationStyle
=
.
overFullScreen
self
.
view
.
addSubview
(
alertView
)
self
.
view
.
showBlur
()
self
.
present
(
alertView
,
animated
:
true
)
alertView
.
selectClickCallback
=
{
isSure
in
alertView
.
selectClickCallback
=
{
isSure
in
self
.
popAdverTisement
()
alertView
.
dismiss
(
animated
:
true
)
AdvManager
.
shared
.
finisedCallBack
=
{
self
.
view
.
hideBlur
()
self
.
setAnimation
()
if
isSure
{
self
.
popAdverTisement
()
AdvManager
.
shared
.
finisedCallBack
=
{
self
.
setAnimation
()
}
}
}
}
}
}
else
{
}
else
{
...
@@ -230,5 +235,5 @@ class ChargeInfoViewController:BaseViewController {
...
@@ -230,5 +235,5 @@ class ChargeInfoViewController:BaseViewController {
func
popAdverTisement
(){
func
popAdverTisement
(){
AdvManager
.
shared
.
showInterstitialAd
(
vc
:
self
)
AdvManager
.
shared
.
showInterstitialAd
(
vc
:
self
)
}
}
}
}
PhoneManager/Class/Page/Compress/Controller/CompressController.swift
View file @
6e9fa4c3
...
@@ -315,15 +315,22 @@ extension CompressController:WaterfallMutiSectionDelegate,UICollectionViewDataSo
...
@@ -315,15 +315,22 @@ extension CompressController:WaterfallMutiSectionDelegate,UICollectionViewDataSo
HomePayViewController
.
show
{
HomePayViewController
.
show
{
if
IAPManager
.
share
.
isSubscribed
==
false
{
if
IAPManager
.
share
.
isSubscribed
==
false
{
// 弹出提示框
// 弹出提示框
let
alertView
=
AdvTipSelectView
(
frame
:
self
.
view
.
bounds
)
self
.
view
.
showBlur
()
var
frame
=
self
.
view
.
bounds
frame
.
origin
.
y
=
frame
.
height
let
alertView
=
AdvTipSelectView
()
alertView
.
selectType
=
.
selectTypeCompressPhoto
alertView
.
selectType
=
.
selectTypeCompressPhoto
alertView
.
getOtherInfoByType
()
alertView
.
getOtherInfoByType
()
alertView
.
modalPresentationStyle
=
.
overFullScreen
self
.
view
.
addSubview
(
alertView
)
self
.
present
(
alertView
,
animated
:
true
)
alertView
.
selectClickCallback
=
{
isSure
in
alertView
.
selectClickCallback
=
{
isSure
in
self
.
popAdverTisement
()
self
.
view
.
hideBlur
()
AdvManager
.
shared
.
finisedCallBack
=
{
alertView
.
dismiss
(
animated
:
true
)
self
.
jumpToNextPage
()
if
isSure
{
self
.
popAdverTisement
()
AdvManager
.
shared
.
finisedCallBack
=
{
self
.
jumpToNextPage
()
}
}
}
}
}
}
else
{
}
else
{
...
...
PhoneManager/Class/Page/Contact/Controller/ContactAllViewController.swift
View file @
6e9fa4c3
...
@@ -53,7 +53,7 @@ class ContactAllViewController : BaseViewController {
...
@@ -53,7 +53,7 @@ class ContactAllViewController : BaseViewController {
}
}
}
}
override
func
viewDidLoad
()
{
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
super
.
viewDidLoad
()
...
...
PhoneManager/Class/Page/Contact/Controller/ContactBackupDetailViewController.swift
View file @
6e9fa4c3
...
@@ -235,7 +235,11 @@ extension ContactBackupDetailViewController:UITableViewDelegate,UITableViewDataS
...
@@ -235,7 +235,11 @@ extension ContactBackupDetailViewController:UITableViewDelegate,UITableViewDataS
func
alertRestore
()
{
func
alertRestore
()
{
// 是否确实需要恢复
// 是否确实需要恢复
let
alertVc
=
ContactBacRestoreAlertView
(
frame
:
self
.
view
.
bounds
)
let
alertVc
=
ContactBacRestoreAlertView
(
frame
:
self
.
view
.
bounds
)
alertVc
.
alpha
=
0
self
.
view
.
addSubview
(
alertVc
)
self
.
view
.
addSubview
(
alertVc
)
UIView
.
animate
(
withDuration
:
AniDuration
-
0.2
)
{
alertVc
.
alpha
=
1
}
alertVc
.
sureCallBack
=
{
alertVc
.
sureCallBack
=
{
ContactManager
.
performAtomicRestore
(
self
.
dataSourceModel
)
{
success
,
error
in
ContactManager
.
performAtomicRestore
(
self
.
dataSourceModel
)
{
success
,
error
in
if
success
{
if
success
{
...
...
PhoneManager/Class/Page/Contact/Controller/ContactBackupViewController.swift
View file @
6e9fa4c3
...
@@ -84,6 +84,10 @@ class ContactBackupViewController : BaseViewController {
...
@@ -84,6 +84,10 @@ class ContactBackupViewController : BaseViewController {
// 再次请求数据 重新刷新页面
// 再次请求数据 重新刷新页面
let
buAlertVc
=
ContactBackUpCompletedAlertView
(
frame
:
self
.
view
.
bounds
)
let
buAlertVc
=
ContactBackUpCompletedAlertView
(
frame
:
self
.
view
.
bounds
)
self
.
view
.
addSubview
(
buAlertVc
)
self
.
view
.
addSubview
(
buAlertVc
)
buAlertVc
.
alpha
=
0
UIView
.
animate
(
withDuration
:
AniDuration
-
0.2
)
{
buAlertVc
.
alpha
=
1
}
DispatchQueue
.
main
.
asyncAfter
(
deadline
:
.
now
()
+
1
)
{
DispatchQueue
.
main
.
asyncAfter
(
deadline
:
.
now
()
+
1
)
{
buAlertVc
.
removeFromSuperview
()
buAlertVc
.
removeFromSuperview
()
self
.
updateCurrentPageData
()
self
.
updateCurrentPageData
()
...
@@ -93,6 +97,10 @@ class ContactBackupViewController : BaseViewController {
...
@@ -93,6 +97,10 @@ class ContactBackupViewController : BaseViewController {
}
else
{
}
else
{
let
buAlertVc
=
ContactBackUpNoDataAlertView
(
frame
:
(
cWindow
?
.
bounds
)
!
)
let
buAlertVc
=
ContactBackUpNoDataAlertView
(
frame
:
(
cWindow
?
.
bounds
)
!
)
cWindow
?
.
addSubview
(
buAlertVc
)
cWindow
?
.
addSubview
(
buAlertVc
)
buAlertVc
.
alpha
=
0
UIView
.
animate
(
withDuration
:
AniDuration
-
0.2
)
{
buAlertVc
.
alpha
=
1
}
DispatchQueue
.
main
.
asyncAfter
(
deadline
:
.
now
()
+
1
)
{
DispatchQueue
.
main
.
asyncAfter
(
deadline
:
.
now
()
+
1
)
{
buAlertVc
.
removeFromSuperview
()
buAlertVc
.
removeFromSuperview
()
}
}
...
...
PhoneManager/Class/Page/Contact/View/All/ContactAllView.swift
View file @
6e9fa4c3
...
@@ -272,18 +272,43 @@ extension ContactAllView : UITableViewDataSource,UITableViewDelegate {
...
@@ -272,18 +272,43 @@ extension ContactAllView : UITableViewDataSource,UITableViewDelegate {
func
alertWhenDeleteSomeOne
()
{
func
alertWhenDeleteSomeOne
()
{
// 删除之前弹出是否需要备份
// 删除之前弹出是否需要备份
let
alertVc
=
ContactBackupAlertView
()
let
alertVc
=
ContactBackupAlertView
()
alertVc
.
frame
=
(
self
.
responderViewController
()?
.
view
.
bounds
)
!
self
.
responderViewController
()?
.
view
.
showBlur
()
self
.
responderViewController
()?
.
view
.
addSubview
(
alertVc
)
self
.
responderViewController
()?
.
view
.
addSubview
(
alertVc
)
alertVc
.
frame
=
CGRectMake
(
0
,
ScreenH
,
ScreenW
,
ScreenH
)
UIView
.
animate
(
withDuration
:
AniDuration
)
{
alertVc
.
frame
=
CGRectMake
(
0
,
0
,
ScreenW
,
ScreenH
)
}
alertVc
.
sureCallBack
=
{[
weak
self
]
isSure
in
alertVc
.
sureCallBack
=
{[
weak
self
]
isSure
in
guard
let
self
else
{
return
}
guard
let
self
else
{
return
}
if
isSure
{
self
.
responderViewController
()?
.
view
.
hideBlur
()
backupContactsByselect
{
DispatchQueue
.
main
.
asyncAfter
(
deadline
:
.
now
()
+
AniDuration
)
{
if
isSure
{
self
.
backupContactsByselect
{
// 删除之前弹出是否真的需要删除
let
alertVc
=
ContactDeleteAlertView
()
alertVc
.
frame
=
(
self
.
responderViewController
()?
.
view
.
bounds
)
!
alertVc
.
alpha
=
0
cWindow
?
.
addSubview
(
alertVc
)
UIView
.
animate
(
withDuration
:
AniDuration
-
0.2
)
{
alertVc
.
alpha
=
1
}
alertVc
.
sureCallBack
=
{[
weak
self
]
isSure
in
guard
let
self
else
{
return
}
if
isSure
{
// 提示是否删除
self
.
deleteContacts
()
}
}
}
}
else
{
// 删除之前弹出是否真的需要删除
// 删除之前弹出是否真的需要删除
let
alertVc
=
ContactDeleteAlertView
()
let
alertVc
=
ContactDeleteAlertView
()
alertVc
.
frame
=
(
self
.
responderViewController
()?
.
view
.
bounds
)
!
alertVc
.
frame
=
(
self
.
responderViewController
()?
.
view
.
bounds
)
!
cWindow
?
.
addSubview
(
alertVc
)
cWindow
?
.
addSubview
(
alertVc
)
alertVc
.
alpha
=
0
UIView
.
animate
(
withDuration
:
AniDuration
-
0.2
)
{
alertVc
.
alpha
=
1
}
alertVc
.
sureCallBack
=
{[
weak
self
]
isSure
in
alertVc
.
sureCallBack
=
{[
weak
self
]
isSure
in
guard
let
self
else
{
return
}
guard
let
self
else
{
return
}
if
isSure
{
if
isSure
{
...
@@ -292,19 +317,6 @@ extension ContactAllView : UITableViewDataSource,UITableViewDelegate {
...
@@ -292,19 +317,6 @@ extension ContactAllView : UITableViewDataSource,UITableViewDelegate {
}
}
}
}
}
}
}
else
{
// 删除之前弹出是否真的需要删除
let
alertVc
=
ContactDeleteAlertView
()
alertVc
.
frame
=
(
self
.
responderViewController
()?
.
view
.
bounds
)
!
cWindow
?
.
addSubview
(
alertVc
)
alertVc
.
sureCallBack
=
{[
weak
self
]
isSure
in
guard
let
self
else
{
return
}
if
isSure
{
// 提示是否删除
self
.
deleteContacts
()
}
}
}
}
}
}
}
}
...
@@ -317,7 +329,11 @@ extension ContactAllView : UITableViewDataSource,UITableViewDelegate {
...
@@ -317,7 +329,11 @@ extension ContactAllView : UITableViewDataSource,UITableViewDelegate {
// 备份成功
// 备份成功
DispatchQueue
.
main
.
async
{
DispatchQueue
.
main
.
async
{
let
buAlertVc
=
ContactBackUpCompletedAlertView
(
frame
:
(
cWindow
?
.
bounds
)
!
)
let
buAlertVc
=
ContactBackUpCompletedAlertView
(
frame
:
(
cWindow
?
.
bounds
)
!
)
buAlertVc
.
alpha
=
0
cWindow
?
.
addSubview
(
buAlertVc
)
cWindow
?
.
addSubview
(
buAlertVc
)
UIView
.
animate
(
withDuration
:
AniDuration
-
0.2
)
{
buAlertVc
.
alpha
=
1
}
DispatchQueue
.
main
.
asyncAfter
(
deadline
:
.
now
()
+
1
)
{
DispatchQueue
.
main
.
asyncAfter
(
deadline
:
.
now
()
+
1
)
{
buAlertVc
.
removeFromSuperview
()
buAlertVc
.
removeFromSuperview
()
success
()
success
()
...
@@ -364,8 +380,16 @@ extension ContactAllView : UITableViewDataSource,UITableViewDelegate {
...
@@ -364,8 +380,16 @@ extension ContactAllView : UITableViewDataSource,UITableViewDelegate {
// 删除完成 弹窗
// 删除完成 弹窗
let
buAlertVc
=
ContactBackUpDeleteCompletedAlertView
(
frame
:
(
cWindow
?
.
bounds
)
!
)
let
buAlertVc
=
ContactBackUpDeleteCompletedAlertView
(
frame
:
(
cWindow
?
.
bounds
)
!
)
cWindow
?
.
addSubview
(
buAlertVc
)
cWindow
?
.
addSubview
(
buAlertVc
)
buAlertVc
.
alpha
=
0
UIView
.
animate
(
withDuration
:
AniDuration
-
0.2
)
{
buAlertVc
.
alpha
=
1
}
DispatchQueue
.
main
.
asyncAfter
(
deadline
:
.
now
()
+
2
)
{
DispatchQueue
.
main
.
asyncAfter
(
deadline
:
.
now
()
+
2
)
{
buAlertVc
.
removeFromSuperview
()
UIView
.
animate
(
withDuration
:
AniDuration
-
0.2
)
{
buAlertVc
.
alpha
=
0
}
completion
:
{
su
in
buAlertVc
.
removeFromSuperview
()
}
}
}
break
break
case
.
failure
(
.
contactNotFound
(
let
missing
)):
case
.
failure
(
.
contactNotFound
(
let
missing
)):
...
...
PhoneManager/Class/Page/Contact/View/Bac/ContactBackUpNormalView.swift
View file @
6e9fa4c3
...
@@ -130,8 +130,16 @@ extension ContactBackUpNormalView : UITableViewDelegate,UITableViewDataSource{
...
@@ -130,8 +130,16 @@ extension ContactBackUpNormalView : UITableViewDelegate,UITableViewDataSource{
// 弹框提示成功
// 弹框提示成功
let
buAlertVc
=
ContactBackUpDeleteCompletedAlertView
(
frame
:
(
cWindow
?
.
bounds
)
!
)
let
buAlertVc
=
ContactBackUpDeleteCompletedAlertView
(
frame
:
(
cWindow
?
.
bounds
)
!
)
cWindow
?
.
addSubview
(
buAlertVc
)
cWindow
?
.
addSubview
(
buAlertVc
)
buAlertVc
.
alpha
=
0
UIView
.
animate
(
withDuration
:
AniDuration
-
0.2
)
{
buAlertVc
.
alpha
=
1
}
DispatchQueue
.
main
.
asyncAfter
(
deadline
:
.
now
()
+
2
)
{
DispatchQueue
.
main
.
asyncAfter
(
deadline
:
.
now
()
+
2
)
{
buAlertVc
.
removeFromSuperview
()
UIView
.
animate
(
withDuration
:
AniDuration
-
0.2
)
{
buAlertVc
.
alpha
=
0
}
completion
:
{
su
in
buAlertVc
.
removeFromSuperview
()
}
}
}
// 成功之后给上游发消息
// 成功之后给上游发消息
if
self
.
dataSourceModel
.
count
<=
0
{
if
self
.
dataSourceModel
.
count
<=
0
{
...
@@ -157,6 +165,10 @@ extension ContactBackUpNormalView : UITableViewDelegate,UITableViewDataSource{
...
@@ -157,6 +165,10 @@ extension ContactBackUpNormalView : UITableViewDelegate,UITableViewDataSource{
let
alertVc
=
ContactDeleteAlertView
()
let
alertVc
=
ContactDeleteAlertView
()
alertVc
.
frame
=
(
self
?
.
responderViewController
()?
.
view
.
bounds
)
!
alertVc
.
frame
=
(
self
?
.
responderViewController
()?
.
view
.
bounds
)
!
self
?
.
responderViewController
()?
.
view
.
addSubview
(
alertVc
)
self
?
.
responderViewController
()?
.
view
.
addSubview
(
alertVc
)
alertVc
.
alpha
=
0
UIView
.
animate
(
withDuration
:
AniDuration
-
0.2
)
{
alertVc
.
alpha
=
1
}
alertVc
.
sureCallBack
=
{
isSure
in
alertVc
.
sureCallBack
=
{
isSure
in
self
?
.
dataSourceModel
.
remove
(
at
:
indexPath
.
section
)
self
?
.
dataSourceModel
.
remove
(
at
:
indexPath
.
section
)
// 删除整个部分而不是特定行
// 删除整个部分而不是特定行
...
@@ -182,8 +194,16 @@ extension ContactBackUpNormalView : UITableViewDelegate,UITableViewDataSource{
...
@@ -182,8 +194,16 @@ extension ContactBackUpNormalView : UITableViewDelegate,UITableViewDataSource{
DispatchQueue
.
main
.
async
{
DispatchQueue
.
main
.
async
{
let
buAlertVc
=
ContactBackUpCompletedAlertView
(
frame
:
(
cWindow
?
.
bounds
)
!
)
let
buAlertVc
=
ContactBackUpCompletedAlertView
(
frame
:
(
cWindow
?
.
bounds
)
!
)
cWindow
?
.
addSubview
(
buAlertVc
)
cWindow
?
.
addSubview
(
buAlertVc
)
buAlertVc
.
alpha
=
0
UIView
.
animate
(
withDuration
:
AniDuration
-
0.2
)
{
buAlertVc
.
alpha
=
1
}
DispatchQueue
.
main
.
asyncAfter
(
deadline
:
.
now
()
+
1
)
{
DispatchQueue
.
main
.
asyncAfter
(
deadline
:
.
now
()
+
1
)
{
buAlertVc
.
removeFromSuperview
()
UIView
.
animate
(
withDuration
:
AniDuration
-
0.2
)
{
buAlertVc
.
alpha
=
0
}
completion
:
{
su
in
buAlertVc
.
removeFromSuperview
()
}
}
}
// 再次请求数据 重新刷新页面
// 再次请求数据 重新刷新页面
self
.
updateData
()
self
.
updateData
()
...
@@ -192,15 +212,31 @@ extension ContactBackUpNormalView : UITableViewDelegate,UITableViewDataSource{
...
@@ -192,15 +212,31 @@ extension ContactBackUpNormalView : UITableViewDelegate,UITableViewDataSource{
}
else
{
}
else
{
let
buAlertVc
=
ContactBackUpNoDataAlertView
(
frame
:
(
cWindow
?
.
bounds
)
!
)
let
buAlertVc
=
ContactBackUpNoDataAlertView
(
frame
:
(
cWindow
?
.
bounds
)
!
)
cWindow
?
.
addSubview
(
buAlertVc
)
cWindow
?
.
addSubview
(
buAlertVc
)
buAlertVc
.
alpha
=
0
UIView
.
animate
(
withDuration
:
AniDuration
-
0.2
)
{
buAlertVc
.
alpha
=
1
}
DispatchQueue
.
main
.
asyncAfter
(
deadline
:
.
now
()
+
1
)
{
DispatchQueue
.
main
.
asyncAfter
(
deadline
:
.
now
()
+
1
)
{
buAlertVc
.
removeFromSuperview
()
UIView
.
animate
(
withDuration
:
AniDuration
-
0.2
)
{
buAlertVc
.
alpha
=
0
}
completion
:
{
su
in
buAlertVc
.
removeFromSuperview
()
}
}
}
}
}
}
else
{
}
else
{
let
buAlertVc
=
ContactBackUpNoDataAlertView
(
frame
:
(
cWindow
?
.
bounds
)
!
)
let
buAlertVc
=
ContactBackUpNoDataAlertView
(
frame
:
(
cWindow
?
.
bounds
)
!
)
cWindow
?
.
addSubview
(
buAlertVc
)
cWindow
?
.
addSubview
(
buAlertVc
)
buAlertVc
.
alpha
=
0
UIView
.
animate
(
withDuration
:
AniDuration
-
0.2
)
{
buAlertVc
.
alpha
=
1
}
DispatchQueue
.
main
.
asyncAfter
(
deadline
:
.
now
()
+
1
)
{
DispatchQueue
.
main
.
asyncAfter
(
deadline
:
.
now
()
+
1
)
{
buAlertVc
.
removeFromSuperview
()
UIView
.
animate
(
withDuration
:
AniDuration
-
0.2
)
{
buAlertVc
.
alpha
=
0
}
completion
:
{
su
in
buAlertVc
.
removeFromSuperview
()
}
}
}
}
}
}
}
...
...
PhoneManager/Class/Page/Contact/View/Common/AlertView/ContactBackupAlertView.swift
View file @
6e9fa4c3
...
@@ -14,7 +14,7 @@ class ContactBackupAlertView : UIView {
...
@@ -14,7 +14,7 @@ class ContactBackupAlertView : UIView {
// 懒加载背景视图
// 懒加载背景视图
private
lazy
var
backgroundView
:
UIView
=
{
private
lazy
var
backgroundView
:
UIView
=
{
let
view
=
UIView
()
let
view
=
UIView
()
view
.
backgroundColor
=
UIColor
(
red
:
1
,
green
:
1
,
blue
:
1
,
alpha
:
0.4000
)
view
.
backgroundColor
=
.
clear
//
UIColor(red: 1, green: 1, blue: 1, alpha: 0.4000)
return
view
return
view
}()
}()
...
@@ -76,7 +76,7 @@ class ContactBackupAlertView : UIView {
...
@@ -76,7 +76,7 @@ class ContactBackupAlertView : UIView {
override
init
(
frame
:
CGRect
)
{
override
init
(
frame
:
CGRect
)
{
super
.
init
(
frame
:
frame
)
super
.
init
(
frame
:
frame
)
self
.
backgroundColor
=
UIColor
(
red
:
0
,
green
:
0
,
blue
:
0
,
alpha
:
0.5000
)
self
.
backgroundColor
=
.
clear
//
UIColor(red: 0, green: 0, blue: 0, alpha: 0.5000)
setupViews
()
setupViews
()
}
}
...
@@ -128,12 +128,20 @@ class ContactBackupAlertView : UIView {
...
@@ -128,12 +128,20 @@ class ContactBackupAlertView : UIView {
}
}
@objc
private
func
dismissAlert
()
{
@objc
private
func
dismissAlert
()
{
self
.
removeFromSuperview
()
UIView
.
animate
(
withDuration
:
AniDuration
)
{
self
.
frame
=
CGRect
(
x
:
0
,
y
:
ScreenH
,
width
:
ScreenW
,
height
:
ScreenH
)
}
completion
:
{
su
in
self
.
removeFromSuperview
()
}
sureCallBack
(
false
)
sureCallBack
(
false
)
}
}
@objc
private
func
sureAlert
()
{
@objc
private
func
sureAlert
()
{
self
.
removeFromSuperview
()
UIView
.
animate
(
withDuration
:
AniDuration
)
{
self
.
frame
=
CGRect
(
x
:
0
,
y
:
ScreenH
,
width
:
ScreenW
,
height
:
ScreenH
)
}
completion
:
{
su
in
self
.
removeFromSuperview
()
}
sureCallBack
(
true
)
sureCallBack
(
true
)
}
}
}
}
PhoneManager/Class/Page/Contact/View/Common/AlertView/ContactDeleteAlertView.swift
View file @
6e9fa4c3
...
@@ -155,11 +155,20 @@ class ContactDeleteAlertView : UIView {
...
@@ -155,11 +155,20 @@ class ContactDeleteAlertView : UIView {
}
}
@objc
private
func
dismissAlert
()
{
@objc
private
func
dismissAlert
()
{
self
.
removeFromSuperview
()
UIView
.
animate
(
withDuration
:
AniDuration
-
0.2
)
{
self
.
alpha
=
0
}
completion
:
{
su
in
self
.
removeFromSuperview
()
}
}
}
@objc
private
func
sureAlert
()
{
@objc
private
func
sureAlert
()
{
self
.
removeFromSuperview
()
UIView
.
animate
(
withDuration
:
AniDuration
-
0.2
)
{
sureCallBack
(
true
)
self
.
alpha
=
0
}
completion
:
{
su
in
self
.
sureCallBack
(
true
)
self
.
removeFromSuperview
()
}
}
}
}
}
PhoneManager/Class/Page/Contact/View/Common/AlertView/ContactMergeAlertView.swift
View file @
6e9fa4c3
...
@@ -155,11 +155,19 @@ class ContactMergeAlertView : UIView {
...
@@ -155,11 +155,19 @@ class ContactMergeAlertView : UIView {
}
}
@objc
private
func
dismissAlert
()
{
@objc
private
func
dismissAlert
()
{
self
.
removeFromSuperview
()
UIView
.
animate
(
withDuration
:
AniDuration
-
0.2
)
{
self
.
alpha
=
0
}
completion
:
{
su
in
self
.
removeFromSuperview
()
}
}
}
@objc
private
func
sureAlert
()
{
@objc
private
func
sureAlert
()
{
self
.
removeFromSuperview
()
UIView
.
animate
(
withDuration
:
AniDuration
-
0.2
)
{
sureCallBack
()
self
.
alpha
=
0
}
completion
:
{
su
in
self
.
removeFromSuperview
()
self
.
sureCallBack
()
}
}
}
}
}
PhoneManager/Class/Page/Contact/View/Dup/ContactDupPreNormalView.swift
View file @
6e9fa4c3
...
@@ -104,8 +104,16 @@ class ContactDupPreNormalView : UIView {
...
@@ -104,8 +104,16 @@ class ContactDupPreNormalView : UIView {
// 弹框提示成功
// 弹框提示成功
let
buAlertVc
=
ContactBackUpDeleteCompletedAlertView
(
frame
:
(
cWindow
?
.
bounds
)
!
)
let
buAlertVc
=
ContactBackUpDeleteCompletedAlertView
(
frame
:
(
cWindow
?
.
bounds
)
!
)
cWindow
?
.
addSubview
(
buAlertVc
)
cWindow
?
.
addSubview
(
buAlertVc
)
buAlertVc
.
alpha
=
0
UIView
.
animate
(
withDuration
:
AniDuration
-
0.2
)
{
buAlertVc
.
alpha
=
1
}
DispatchQueue
.
main
.
asyncAfter
(
deadline
:
.
now
()
+
2
)
{
DispatchQueue
.
main
.
asyncAfter
(
deadline
:
.
now
()
+
2
)
{
buAlertVc
.
removeFromSuperview
()
UIView
.
animate
(
withDuration
:
AniDuration
-
0.2
)
{
buAlertVc
.
alpha
=
0
}
completion
:
{
su
in
buAlertVc
.
removeFromSuperview
()
}
// 返回重复项
// 返回重复项
}
}
self
.
responderViewController
()?
.
navigationController
?
.
popViewController
(
animated
:
true
)
self
.
responderViewController
()?
.
navigationController
?
.
popViewController
(
animated
:
true
)
...
...
PhoneManager/Class/Page/Contact/View/Dup/MergeButtonView.swift
View file @
6e9fa4c3
...
@@ -68,6 +68,10 @@ extension MergeButtonView {
...
@@ -68,6 +68,10 @@ extension MergeButtonView {
let
mergeAlertView
:
ContactMergeAlertView
=
ContactMergeAlertView
()
let
mergeAlertView
:
ContactMergeAlertView
=
ContactMergeAlertView
()
mergeAlertView
.
frame
=
(
self
.
responderViewController
()?
.
view
.
bounds
)
!
mergeAlertView
.
frame
=
(
self
.
responderViewController
()?
.
view
.
bounds
)
!
cWindow
?
.
addSubview
(
mergeAlertView
)
cWindow
?
.
addSubview
(
mergeAlertView
)
mergeAlertView
.
alpha
=
0
UIView
.
animate
(
withDuration
:
AniDuration
-
0.2
)
{
mergeAlertView
.
alpha
=
1
}
mergeAlertView
.
sureCallBack
=
{
mergeAlertView
.
sureCallBack
=
{
self
.
mergeCallBack
()
self
.
mergeCallBack
()
}
}
...
@@ -76,18 +80,25 @@ extension MergeButtonView {
...
@@ -76,18 +80,25 @@ extension MergeButtonView {
func
alertWhenMergeContact
()
{
func
alertWhenMergeContact
()
{
// 删除之前弹出是否需要备份
// 删除之前弹出是否需要备份
let
alertVc
=
ContactBackupAlertView
()
let
alertVc
=
ContactBackupAlertView
()
alertVc
.
frame
=
(
self
.
responderViewController
()?
.
view
.
bounds
)
!
self
.
responderViewController
()?
.
view
.
showBlur
()
alertVc
.
frame
=
CGRectMake
(
0
,
ScreenH
,
ScreenW
,
ScreenH
)
//(self.responderViewController()?.view.bounds)!
self
.
responderViewController
()?
.
view
.
addSubview
(
alertVc
)
self
.
responderViewController
()?
.
view
.
addSubview
(
alertVc
)
UIView
.
animate
(
withDuration
:
AniDuration
)
{
alertVc
.
frame
=
CGRectMake
(
0
,
0
,
ScreenW
,
ScreenH
)
}
alertVc
.
sureCallBack
=
{[
weak
self
]
isSure
in
alertVc
.
sureCallBack
=
{[
weak
self
]
isSure
in
guard
let
self
else
{
return
}
guard
let
self
else
{
return
}
if
isSure
{
self
.
responderViewController
()?
.
view
.
hideBlur
()
backupContactsByselect
{
DispatchQueue
.
main
.
asyncAfter
(
deadline
:
.
now
()
+
AniDuration
)
{
// 备份完成后开始合并
if
isSure
{
self
.
backupContactsByselect
{
// 备份完成后开始合并
self
.
showMeegeAlert
(
self
)
}
}
else
{
self
.
showMeegeAlert
(
self
)
self
.
showMeegeAlert
(
self
)
}
}
}
else
{
showMeegeAlert
(
self
)
}
}
}
}
}
}
...
@@ -117,9 +128,17 @@ extension MergeButtonView {
...
@@ -117,9 +128,17 @@ extension MergeButtonView {
DispatchQueue
.
main
.
async
{
DispatchQueue
.
main
.
async
{
let
buAlertVc
=
ContactBackUpCompletedAlertView
(
frame
:
(
cWindow
?
.
bounds
)
!
)
let
buAlertVc
=
ContactBackUpCompletedAlertView
(
frame
:
(
cWindow
?
.
bounds
)
!
)
cWindow
?
.
addSubview
(
buAlertVc
)
cWindow
?
.
addSubview
(
buAlertVc
)
buAlertVc
.
alpha
=
0
UIView
.
animate
(
withDuration
:
AniDuration
-
0.2
)
{
buAlertVc
.
alpha
=
1
}
DispatchQueue
.
main
.
asyncAfter
(
deadline
:
.
now
()
+
1
)
{
DispatchQueue
.
main
.
asyncAfter
(
deadline
:
.
now
()
+
1
)
{
buAlertVc
.
removeFromSuperview
()
UIView
.
animate
(
withDuration
:
AniDuration
-
0.2
)
{
success
()
buAlertVc
.
alpha
=
0
}
completion
:
{
su
in
buAlertVc
.
removeFromSuperview
()
success
()
}
}
}
}
}
}
else
{
}
else
{
...
...
PhoneManager/Class/Page/Contact/View/Inc/ContactNormalIncomView.swift
View file @
6e9fa4c3
...
@@ -189,7 +189,10 @@ extension ContactNormalIncomView : UITableViewDataSource,UITableViewDelegate {
...
@@ -189,7 +189,10 @@ extension ContactNormalIncomView : UITableViewDataSource,UITableViewDelegate {
let
alertVc
=
ContactDeleteAlertView
()
let
alertVc
=
ContactDeleteAlertView
()
alertVc
.
frame
=
(
self
.
responderViewController
()?
.
view
.
bounds
)
!
alertVc
.
frame
=
(
self
.
responderViewController
()?
.
view
.
bounds
)
!
cWindow
?
.
addSubview
(
alertVc
)
cWindow
?
.
addSubview
(
alertVc
)
alertVc
.
alpha
=
0
UIView
.
animate
(
withDuration
:
AniDuration
-
0.2
)
{
alertVc
.
alpha
=
1
}
alertVc
.
sureCallBack
=
{[
weak
self
]
isSure
in
alertVc
.
sureCallBack
=
{[
weak
self
]
isSure
in
guard
let
self
else
{
return
}
guard
let
self
else
{
return
}
if
isSure
{
if
isSure
{
...
@@ -221,8 +224,16 @@ extension ContactNormalIncomView : UITableViewDataSource,UITableViewDelegate {
...
@@ -221,8 +224,16 @@ extension ContactNormalIncomView : UITableViewDataSource,UITableViewDelegate {
// 删除完成 弹窗
// 删除完成 弹窗
let
buAlertVc
=
ContactBackUpDeleteCompletedAlertView
(
frame
:
(
cWindow
?
.
bounds
)
!
)
let
buAlertVc
=
ContactBackUpDeleteCompletedAlertView
(
frame
:
(
cWindow
?
.
bounds
)
!
)
cWindow
?
.
addSubview
(
buAlertVc
)
cWindow
?
.
addSubview
(
buAlertVc
)
buAlertVc
.
alpha
=
0
UIView
.
animate
(
withDuration
:
AniDuration
-
0.2
)
{
buAlertVc
.
alpha
=
1
}
DispatchQueue
.
main
.
asyncAfter
(
deadline
:
.
now
()
+
2
)
{
DispatchQueue
.
main
.
asyncAfter
(
deadline
:
.
now
()
+
2
)
{
buAlertVc
.
removeFromSuperview
()
UIView
.
animate
(
withDuration
:
AniDuration
-
0.2
)
{
buAlertVc
.
alpha
=
0
}
completion
:
{
su
in
buAlertVc
.
removeFromSuperview
()
}
}
}
break
break
case
.
failure
(
.
contactNotFound
(
let
missing
)):
case
.
failure
(
.
contactNotFound
(
let
missing
)):
...
...
PhoneManager/Class/Page/Home/Controller/HomeInfoViewController.swift
View file @
6e9fa4c3
...
@@ -84,8 +84,7 @@ class HomeInfoViewController:BaseViewController {
...
@@ -84,8 +84,7 @@ class HomeInfoViewController:BaseViewController {
DispatchQueue
.
main
.
asyncAfter
(
deadline
:
.
now
()
+
1.0
)
{
DispatchQueue
.
main
.
asyncAfter
(
deadline
:
.
now
()
+
1.0
)
{
PMLoadingHUD
.
share
.
disMiss
()
PMLoadingHUD
.
share
.
disMiss
()
// 结束之后是否弹出评价页面
SystemCommentManager
.
showCommentPage
()
// 更新免费次数
// 更新免费次数
if
isAfterAdv
==
false
{
if
isAfterAdv
==
false
{
...
@@ -122,6 +121,7 @@ class HomeInfoViewController:BaseViewController {
...
@@ -122,6 +121,7 @@ class HomeInfoViewController:BaseViewController {
// 显示弹出框
// 显示弹出框
func
showPopView
(
popView
:
AdvTipDeleteView
){
func
showPopView
(
popView
:
AdvTipDeleteView
){
self
.
view
.
showBlur
()
self
.
view
.
addSubview
(
popView
)
self
.
view
.
addSubview
(
popView
)
}
}
...
@@ -223,8 +223,12 @@ class HomeInfoViewController:BaseViewController {
...
@@ -223,8 +223,12 @@ class HomeInfoViewController:BaseViewController {
view
.
deleteButtonClickCallback
=
{[
weak
self
]
isMore
,
deleteCount
in
view
.
deleteButtonClickCallback
=
{[
weak
self
]
isMore
,
deleteCount
in
self
?
.
view
.
hideBlur
()
guard
let
self
else
{
return
}
guard
let
self
else
{
return
}
let
finalyDeleteArray
=
array
if
deleteCount
<
0
{
return
}
let
finalyDeleteArray
=
array
var
tempArr
:
[
AssetModel
]
=
[]
var
tempArr
:
[
AssetModel
]
=
[]
for
item
in
finalyDeleteArray
{
for
item
in
finalyDeleteArray
{
if
tempArr
.
count
<
deleteCount
{
if
tempArr
.
count
<
deleteCount
{
...
@@ -251,7 +255,6 @@ class HomeInfoViewController:BaseViewController {
...
@@ -251,7 +255,6 @@ class HomeInfoViewController:BaseViewController {
}
}
}
else
{
}
else
{
deleteOp
(
imgs
:
array
,
isAfterAdv
:
false
)
deleteOp
(
imgs
:
array
,
isAfterAdv
:
false
)
}
}
}
}
...
@@ -330,6 +333,11 @@ class HomeInfoViewController:BaseViewController {
...
@@ -330,6 +333,11 @@ class HomeInfoViewController:BaseViewController {
vc
.
fileSzie
=
fileSize
vc
.
fileSzie
=
fileSize
vc
.
fileCount
=
fileCount
vc
.
fileCount
=
fileCount
vc
.
modalPresentationStyle
=
.
fullScreen
vc
.
modalPresentationStyle
=
.
fullScreen
vc
.
closeCall
=
{
[
weak
self
]
in
guard
let
self
=
self
else
{
return
}
// 结束之后是否弹出评价页面
SystemCommentManager
.
showCommentPage
(
self
.
view
)
}
self
.
present
(
vc
,
animated
:
true
)
self
.
present
(
vc
,
animated
:
true
)
}
}
}
}
...
...
PhoneManager/Class/Page/Home/Controller/HomePhotosDetailViewController.swift
View file @
6e9fa4c3
...
@@ -628,8 +628,8 @@ extension HomePhotosDetailViewController:WaterfallMutiSectionDelegate,UICollecti
...
@@ -628,8 +628,8 @@ extension HomePhotosDetailViewController:WaterfallMutiSectionDelegate,UICollecti
// 显示弹出框
// 显示弹出框
func
showPopView
(
popView
:
AdvTipDeleteView
){
func
showPopView
(
popView
:
AdvTipDeleteView
){
self
.
view
.
showBlur
()
self
.
view
.
addSubview
(
popView
)
self
.
view
.
addSubview
(
popView
)
}
}
...
@@ -722,6 +722,10 @@ extension HomePhotosDetailViewController:WaterfallMutiSectionDelegate,UICollecti
...
@@ -722,6 +722,10 @@ extension HomePhotosDetailViewController:WaterfallMutiSectionDelegate,UICollecti
}
}
}
}
view
.
deleteButtonClickCallback
=
{
isMore
,
deleteCount
in
view
.
deleteButtonClickCallback
=
{
isMore
,
deleteCount
in
self
.
view
.
hideBlur
()
if
deleteCount
<
0
{
return
}
if
isMore
==
true
{
if
isMore
==
true
{
if
IAPManager
.
share
.
isSubscribed
==
false
{
if
IAPManager
.
share
.
isSubscribed
==
false
{
self
.
popAdverTisement
()
self
.
popAdverTisement
()
...
@@ -765,7 +769,7 @@ extension HomePhotosDetailViewController:WaterfallMutiSectionDelegate,UICollecti
...
@@ -765,7 +769,7 @@ extension HomePhotosDetailViewController:WaterfallMutiSectionDelegate,UICollecti
print
(
"删除文件成功"
)
print
(
"删除文件成功"
)
DispatchQueue
.
main
.
asyncAfter
(
deadline
:
.
now
()
+
1.0
)
{
DispatchQueue
.
main
.
asyncAfter
(
deadline
:
.
now
()
+
1.0
)
{
PMLoadingHUD
.
share
.
disMiss
()
PMLoadingHUD
.
share
.
disMiss
()
SystemCommentManager
.
showCommentPage
()
if
isAfterAdv
==
false
{
if
isAfterAdv
==
false
{
self
.
updateFreeTimes
()
self
.
updateFreeTimes
()
}
}
...
@@ -802,6 +806,10 @@ extension HomePhotosDetailViewController:WaterfallMutiSectionDelegate,UICollecti
...
@@ -802,6 +806,10 @@ extension HomePhotosDetailViewController:WaterfallMutiSectionDelegate,UICollecti
vc
.
fileSzie
=
fileSize
vc
.
fileSzie
=
fileSize
vc
.
fileCount
=
fileCount
vc
.
fileCount
=
fileCount
vc
.
modalPresentationStyle
=
.
fullScreen
vc
.
modalPresentationStyle
=
.
fullScreen
vc
.
closeCall
=
{
[
weak
self
]
in
guard
let
self
=
self
else
{
return
}
SystemCommentManager
.
showCommentPage
(
self
.
view
)
}
self
.
present
(
vc
,
animated
:
true
)
self
.
present
(
vc
,
animated
:
true
)
}
}
}
}
...
...
PhoneManager/Class/Page/Home/Controller/HomeVideoDetailController.swift
View file @
6e9fa4c3
...
@@ -527,8 +527,8 @@ extension HomeVideoDetailController:WaterfallMutiSectionDelegate,UICollectionVie
...
@@ -527,8 +527,8 @@ extension HomeVideoDetailController:WaterfallMutiSectionDelegate,UICollectionVie
// 显示弹出框
// 显示弹出框
func
showPopView
(
popView
:
AdvTipDeleteView
){
func
showPopView
(
popView
:
AdvTipDeleteView
){
self
.
view
.
showBlur
()
self
.
view
.
addSubview
(
popView
)
self
.
view
.
addSubview
(
popView
)
}
}
...
@@ -623,6 +623,10 @@ extension HomeVideoDetailController:WaterfallMutiSectionDelegate,UICollectionVie
...
@@ -623,6 +623,10 @@ extension HomeVideoDetailController:WaterfallMutiSectionDelegate,UICollectionVie
}
}
}
}
view
.
deleteButtonClickCallback
=
{
isMore
,
deleteCount
in
view
.
deleteButtonClickCallback
=
{
isMore
,
deleteCount
in
self
.
view
.
hideBlur
()
if
deleteCount
<
0
{
return
}
if
isMore
==
true
{
if
isMore
==
true
{
if
IAPManager
.
share
.
isSubscribed
==
false
{
if
IAPManager
.
share
.
isSubscribed
==
false
{
self
.
popAdverTisement
()
self
.
popAdverTisement
()
...
@@ -671,8 +675,7 @@ extension HomeVideoDetailController:WaterfallMutiSectionDelegate,UICollectionVie
...
@@ -671,8 +675,7 @@ extension HomeVideoDetailController:WaterfallMutiSectionDelegate,UICollectionVie
DispatchQueue
.
main
.
asyncAfter
(
deadline
:
.
now
()
+
1.0
)
{
DispatchQueue
.
main
.
asyncAfter
(
deadline
:
.
now
()
+
1.0
)
{
PMLoadingHUD
.
share
.
disMiss
()
PMLoadingHUD
.
share
.
disMiss
()
print
(
"删除文件成功"
)
print
(
"删除文件成功"
)
// 如果是看广告删除的,且还有免费次数
SystemCommentManager
.
showCommentPage
()
if
isAfterAdv
==
false
{
if
isAfterAdv
==
false
{
self
.
updateFreeTimes
()
self
.
updateFreeTimes
()
...
@@ -699,6 +702,11 @@ extension HomeVideoDetailController:WaterfallMutiSectionDelegate,UICollectionVie
...
@@ -699,6 +702,11 @@ extension HomeVideoDetailController:WaterfallMutiSectionDelegate,UICollectionVie
vc
.
fileCount
=
fileCount
vc
.
fileCount
=
fileCount
vc
.
modalPresentationStyle
=
.
fullScreen
vc
.
modalPresentationStyle
=
.
fullScreen
self
.
present
(
vc
,
animated
:
true
)
self
.
present
(
vc
,
animated
:
true
)
vc
.
closeCall
=
{
[
weak
self
]
in
guard
let
self
=
self
else
{
return
}
// 如果是看广告删除的,且还有免费次数
SystemCommentManager
.
showCommentPage
(
self
.
view
)
}
}
}
}
}
...
...
PhoneManager/Class/Page/Home/Controller/HomeViewController.swift
View file @
6e9fa4c3
...
@@ -181,11 +181,13 @@ class HomeViewController:BaseViewController {
...
@@ -181,11 +181,13 @@ class HomeViewController:BaseViewController {
view
.
addSubview
(
homeView
!
)
view
.
addSubview
(
homeView
!
)
}
}
override
func
viewDidAppear
(
_
animated
:
Bool
)
{
super
.
viewDidAppear
(
animated
)
barHidden
=
false
}
override
func
viewWillAppear
(
_
animated
:
Bool
)
{
override
func
viewWillAppear
(
_
animated
:
Bool
)
{
super
.
viewWillAppear
(
animated
)
super
.
viewWillAppear
(
animated
)
if
!
isShowCharge
{
if
!
isShowCharge
{
if
BatteryMonitorManager
.
shared
.
getBatteryIsCharging
()
{
if
BatteryMonitorManager
.
shared
.
getBatteryIsCharging
()
{
// 从字典里面取 如果有
// 从字典里面取 如果有
...
@@ -199,7 +201,6 @@ class HomeViewController:BaseViewController {
...
@@ -199,7 +201,6 @@ class HomeViewController:BaseViewController {
}
}
isShowCharge
=
true
isShowCharge
=
true
}
}
homeView
?
.
viewModel
.
reloadTrashAndKeep
()
homeView
?
.
viewModel
.
reloadTrashAndKeep
()
}
}
...
...
PhoneManager/Class/Page/Home/View/ResourceFilterBoxView.swift
View file @
6e9fa4c3
...
@@ -130,7 +130,7 @@ class ResourceFilterBoxView : UIView {
...
@@ -130,7 +130,7 @@ class ResourceFilterBoxView : UIView {
}
}
override
func
removeFromSuperview
()
{
override
func
removeFromSuperview
()
{
UIView
.
animate
(
withDuration
:
0.3
)
{
UIView
.
animate
(
withDuration
:
AniDuration
)
{
// 更新约束
// 更新约束
self
.
backView
.
backgroundColor
=
.
clear
self
.
backView
.
backgroundColor
=
.
clear
self
.
selectedViewBottomConstraint
?
.
update
(
offset
:
440
)
self
.
selectedViewBottomConstraint
?
.
update
(
offset
:
440
)
...
@@ -201,8 +201,8 @@ class ResourceFilterBoxView : UIView {
...
@@ -201,8 +201,8 @@ class ResourceFilterBoxView : UIView {
}
}
// 先显示背景,然后延迟显示弹框
// 先显示背景,然后延迟显示弹框
DispatchQueue
.
main
.
asyncAfter
(
deadline
:
.
now
()
+
0.1
)
{
DispatchQueue
.
main
.
asyncAfter
(
deadline
:
.
now
()
+
0.
0
1
)
{
UIView
.
animate
(
withDuration
:
0.1
)
{
UIView
.
animate
(
withDuration
:
AniDuration
)
{
// 更新约束
// 更新约束
self
.
selectedViewBottomConstraint
?
.
update
(
offset
:
0
)
self
.
selectedViewBottomConstraint
?
.
update
(
offset
:
0
)
self
.
layoutIfNeeded
()
self
.
layoutIfNeeded
()
...
...
PhoneManager/Class/Page/Keep/Controller/MaintaiDetailViewController.swift
View file @
6e9fa4c3
...
@@ -42,16 +42,18 @@ class MaintaiDetailViewController: BaseViewController {
...
@@ -42,16 +42,18 @@ class MaintaiDetailViewController: BaseViewController {
guard
let
weakSelf
=
self
else
{
return
}
guard
let
weakSelf
=
self
else
{
return
}
weakSelf
.
removeFromKeep
()
weakSelf
.
removeFromKeep
()
weakSelf
.
maintaiTipsAlertView
.
disMiss
()
weakSelf
.
maintaiTipsAlertView
.
disMiss
()
weakSelf
.
view
.
hideBlur
()
}
}
maintaiTipsAlertView
.
cancelBlock
=
{[
weak
self
]
in
maintaiTipsAlertView
.
cancelBlock
=
{[
weak
self
]
in
guard
let
weakSelf
=
self
else
{
return
}
guard
let
weakSelf
=
self
else
{
return
}
weakSelf
.
isSelectAll
=
false
weakSelf
.
isSelectAll
=
false
weakSelf
.
view
.
hideBlur
()
}
}
maintaiBottomView
.
removeMaintaiBlock
=
{[
weak
self
]
in
maintaiBottomView
.
removeMaintaiBlock
=
{[
weak
self
]
in
guard
let
weakSelf
=
self
else
{
return
}
guard
let
weakSelf
=
self
else
{
return
}
weakSelf
.
view
.
showBlur
()
weakSelf
.
maintaiTipsAlertView
.
show
()
weakSelf
.
maintaiTipsAlertView
.
show
()
}
}
...
@@ -73,6 +75,7 @@ class MaintaiDetailViewController: BaseViewController {
...
@@ -73,6 +75,7 @@ class MaintaiDetailViewController: BaseViewController {
@objc
func
removeAll
(){
@objc
func
removeAll
(){
isSelectAll
=
true
isSelectAll
=
true
maintaiTipsAlertView
.
show
()
maintaiTipsAlertView
.
show
()
self
.
view
.
showBlur
()
}
}
...
...
PhoneManager/Class/Page/Keep/Controller/MaintainViewListController.swift
View file @
6e9fa4c3
...
@@ -38,17 +38,19 @@ class MaintainViewListController: BaseViewController {
...
@@ -38,17 +38,19 @@ class MaintainViewListController: BaseViewController {
guard
let
weakSelf
=
self
else
{
return
}
guard
let
weakSelf
=
self
else
{
return
}
weakSelf
.
removeFromKeep
()
weakSelf
.
removeFromKeep
()
weakSelf
.
maintaiTipsAlertView
.
disMiss
()
weakSelf
.
maintaiTipsAlertView
.
disMiss
()
weakSelf
.
view
.
hideBlur
()
}
}
maintaiTipsAlertView
.
cancelBlock
=
{[
weak
self
]
in
maintaiTipsAlertView
.
cancelBlock
=
{[
weak
self
]
in
guard
let
weakSelf
=
self
else
{
return
}
guard
let
weakSelf
=
self
else
{
return
}
weakSelf
.
isSelectAll
=
false
weakSelf
.
isSelectAll
=
false
weakSelf
.
view
.
hideBlur
()
}
}
maintaiBottomView
.
removeMaintaiBlock
=
{[
weak
self
]
in
maintaiBottomView
.
removeMaintaiBlock
=
{[
weak
self
]
in
guard
let
weakSelf
=
self
else
{
return
}
guard
let
weakSelf
=
self
else
{
return
}
weakSelf
.
maintaiTipsAlertView
.
show
()
weakSelf
.
maintaiTipsAlertView
.
show
()
weakSelf
.
view
.
showBlur
()
}
}
removeBtn
=
UIButton
()
removeBtn
=
UIButton
()
...
@@ -69,6 +71,7 @@ class MaintainViewListController: BaseViewController {
...
@@ -69,6 +71,7 @@ class MaintainViewListController: BaseViewController {
@objc
func
removeAll
(){
@objc
func
removeAll
(){
isSelectAll
=
true
isSelectAll
=
true
maintaiTipsAlertView
.
show
()
maintaiTipsAlertView
.
show
()
self
.
view
.
showBlur
()
}
}
...
...
PhoneManager/Class/Page/Keep/View/MaintaiTipsAlertView.swift
View file @
6e9fa4c3
...
@@ -15,7 +15,7 @@ class MaintaiTipsAlertView: UIView {
...
@@ -15,7 +15,7 @@ class MaintaiTipsAlertView: UIView {
override
func
awakeFromNib
()
{
override
func
awakeFromNib
()
{
super
.
awakeFromNib
()
super
.
awakeFromNib
()
frame
=
CGRectMake
(
0
,
0
,
ScreenW
,
ScreenH
)
frame
=
CGRectMake
(
0
,
ScreenH
,
ScreenW
,
ScreenH
)
}
}
@IBAction
func
confirmClick
(
_
sender
:
Any
)
{
@IBAction
func
confirmClick
(
_
sender
:
Any
)
{
...
@@ -28,10 +28,19 @@ class MaintaiTipsAlertView: UIView {
...
@@ -28,10 +28,19 @@ class MaintaiTipsAlertView: UIView {
func
disMiss
(){
func
disMiss
(){
cancelBlock
?()
cancelBlock
?()
self
.
removeFromSuperview
()
UIView
.
animate
(
withDuration
:
AniDuration
)
{
self
.
frame
=
CGRectMake
(
0
,
ScreenH
,
ScreenW
,
ScreenH
)
}
completion
:
{
su
in
if
su
{
self
.
removeFromSuperview
()
}
}
}
}
func
show
(){
func
show
(){
KEYWINDOW
()?
.
addSubview
(
self
)
KEYWINDOW
()?
.
addSubview
(
self
)
UIView
.
animate
(
withDuration
:
AniDuration
)
{
self
.
frame
=
CGRectMake
(
0
,
0
,
ScreenW
,
ScreenH
)
}
}
}
}
}
PhoneManager/Class/Page/Keep/View/MaintaiTipsAlertView.xib
View file @
6e9fa4c3
...
@@ -87,7 +87,7 @@
...
@@ -87,7 +87,7 @@
</view>
</view>
</subviews>
</subviews>
<viewLayoutGuide
key=
"safeArea"
id=
"Sg0-yf-Vq3"
/>
<viewLayoutGuide
key=
"safeArea"
id=
"Sg0-yf-Vq3"
/>
<color
key=
"backgroundColor"
red=
"0.066666666666666666"
green=
"0.066666666666666666"
blue=
"0.066666666666666666"
alpha=
"0.59999999999999998"
colorSpace=
"custom"
customColorSpace=
"sRGB
"
/>
<color
key=
"backgroundColor"
white=
"0.0"
alpha=
"0.0"
colorSpace=
"custom"
customColorSpace=
"genericGamma22GrayColorSpace
"
/>
<constraints>
<constraints>
<constraint
firstItem=
"Sg0-yf-Vq3"
firstAttribute=
"trailing"
secondItem=
"SyR-iC-5WC"
secondAttribute=
"trailing"
constant=
"16"
id=
"3rm-dW-0Hp"
/>
<constraint
firstItem=
"Sg0-yf-Vq3"
firstAttribute=
"trailing"
secondItem=
"SyR-iC-5WC"
secondAttribute=
"trailing"
constant=
"16"
id=
"3rm-dW-0Hp"
/>
<constraint
firstItem=
"SyR-iC-5WC"
firstAttribute=
"centerY"
secondItem=
"p11-ka-d5j"
secondAttribute=
"centerY"
id=
"Pm6-OB-Ccw"
/>
<constraint
firstItem=
"SyR-iC-5WC"
firstAttribute=
"centerY"
secondItem=
"p11-ka-d5j"
secondAttribute=
"centerY"
id=
"Pm6-OB-Ccw"
/>
...
@@ -97,7 +97,7 @@
...
@@ -97,7 +97,7 @@
</view>
</view>
</objects>
</objects>
<resources>
<resources>
<image
name=
"ic_list_setting"
width=
"28"
height=
"28"
/>
<image
name=
"ic_list_setting"
width=
"28
.333333969116211
"
height=
"28"
/>
<systemColor
name=
"systemBackgroundColor"
>
<systemColor
name=
"systemBackgroundColor"
>
<color
white=
"1"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"genericGamma22GrayColorSpace"
/>
<color
white=
"1"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"genericGamma22GrayColorSpace"
/>
</systemColor>
</systemColor>
...
...
PhoneManager/Class/Page/Public/Rate/CustomRateView.swift
View file @
6e9fa4c3
...
@@ -11,11 +11,14 @@ class CustomRate{
...
@@ -11,11 +11,14 @@ class CustomRate{
// 自定义初始化方法
// 自定义初始化方法
func
show
()
{
func
show
()
{
let
view
=
Bundle
.
main
.
loadNibNamed
(
"CustomRateView"
,
owner
:
nil
)?
.
last
as!
CustomRateView
view
.
frame
=
CGRect
.
init
(
x
:
0
,
y
:
0
,
width
:
ScreenW
,
height
:
ScreenH
)
view
.
show
()
view
.
show
()
}
}
lazy
var
view
:
CustomRateView
=
{
let
view
=
Bundle
.
main
.
loadNibNamed
(
"CustomRateView"
,
owner
:
nil
)?
.
last
as!
CustomRateView
view
.
frame
=
CGRect
.
init
(
x
:
0
,
y
:
ScreenH
,
width
:
ScreenW
,
height
:
ScreenH
)
return
view
}()
}
}
...
@@ -25,6 +28,8 @@ class CustomRateView: UIView {
...
@@ -25,6 +28,8 @@ class CustomRateView: UIView {
@IBOutlet
weak
var
bgView
:
UIView
!
@IBOutlet
weak
var
bgView
:
UIView
!
@IBOutlet
weak
var
okBtn
:
UIButton
!
@IBOutlet
weak
var
okBtn
:
UIButton
!
var
callblock
:(()
->
Void
)
=
{}
override
func
awakeFromNib
()
{
override
func
awakeFromNib
()
{
super
.
awakeFromNib
()
super
.
awakeFromNib
()
okBtn
.
layer
.
cornerRadius
=
15
okBtn
.
layer
.
cornerRadius
=
15
...
@@ -47,9 +52,9 @@ class CustomRateView: UIView {
...
@@ -47,9 +52,9 @@ class CustomRateView: UIView {
private
func
viewRemoveAction
(){
private
func
viewRemoveAction
(){
DispatchQueue
.
main
.
async
{
DispatchQueue
.
main
.
async
{
self
.
alpha
=
1
self
.
callblock
()
UIView
.
animate
(
withDuration
:
0.2
)
{
UIView
.
animate
(
withDuration
:
AniDuration
)
{
self
.
alpha
=
0
self
.
frame
=
CGRect
.
init
(
x
:
0
,
y
:
ScreenH
,
width
:
ScreenW
,
height
:
ScreenH
)
}
completion
:
{
_
in
}
completion
:
{
_
in
self
.
removeFromSuperview
()
self
.
removeFromSuperview
()
}
}
...
@@ -57,11 +62,14 @@ class CustomRateView: UIView {
...
@@ -57,11 +62,14 @@ class CustomRateView: UIView {
}
}
func
show
(){
func
show
(){
// DispatchQueue.main.async {
KEYWINDOW
()?
.
addSubview
(
self
)
KEYWINDOW
()?
.
addSubview
(
self
)
self
.
alpha
=
0
self
.
frame
=
CGRect
.
init
(
x
:
0
,
y
:
ScreenH
,
width
:
ScreenW
,
height
:
ScreenH
)
UIView
.
animate
(
withDuration
:
0.2
)
{
UIView
.
animate
(
withDuration
:
AniDuration
)
{
self
.
alpha
=
1
self
.
frame
=
CGRect
.
init
(
x
:
0
,
y
:
0
,
width
:
ScreenW
,
height
:
ScreenH
)
}
}
// }
}
}
}
}
PhoneManager/Class/Page/Public/Rate/CustomRateView.xib
View file @
6e9fa4c3
...
@@ -78,7 +78,7 @@
...
@@ -78,7 +78,7 @@
</view>
</view>
</subviews>
</subviews>
<viewLayoutGuide
key=
"safeArea"
id=
"LTt-HW-XdR"
/>
<viewLayoutGuide
key=
"safeArea"
id=
"LTt-HW-XdR"
/>
<color
key=
"backgroundColor"
red=
"0.0"
green=
"0.0"
blue=
"0.0"
alpha=
"0.5"
colorSpace=
"custom"
customColorSpace=
"sRGB
"
/>
<color
key=
"backgroundColor"
white=
"0.0"
alpha=
"0.0"
colorSpace=
"custom"
customColorSpace=
"genericGamma22GrayColorSpace
"
/>
<constraints>
<constraints>
<constraint
firstItem=
"eO0-mO-cv0"
firstAttribute=
"leading"
secondItem=
"LTt-HW-XdR"
secondAttribute=
"leading"
constant=
"15"
id=
"EOH-0c-Twg"
/>
<constraint
firstItem=
"eO0-mO-cv0"
firstAttribute=
"leading"
secondItem=
"LTt-HW-XdR"
secondAttribute=
"leading"
constant=
"15"
id=
"EOH-0c-Twg"
/>
<constraint
firstItem=
"LTt-HW-XdR"
firstAttribute=
"trailing"
secondItem=
"eO0-mO-cv0"
secondAttribute=
"trailing"
constant=
"15"
id=
"TZF-xM-ND5"
/>
<constraint
firstItem=
"LTt-HW-XdR"
firstAttribute=
"trailing"
secondItem=
"eO0-mO-cv0"
secondAttribute=
"trailing"
constant=
"15"
id=
"TZF-xM-ND5"
/>
...
...
PhoneManager/Class/Page/Public/celebrate/DelSuccessViewController.swift
View file @
6e9fa4c3
...
@@ -17,6 +17,9 @@ class DelSuccessViewController: UIViewController {
...
@@ -17,6 +17,9 @@ class DelSuccessViewController: UIViewController {
@IBOutlet
weak
var
delText
:
UILabel
!
@IBOutlet
weak
var
delText
:
UILabel
!
@IBOutlet
weak
var
conTitle
:
UILabel
!
@IBOutlet
weak
var
conTitle
:
UILabel
!
var
closeCall
:(()
->
Void
)
=
{}
var
delType
:
String
=
"photo"
var
delType
:
String
=
"photo"
var
fileCount
:
Int
=
0
var
fileCount
:
Int
=
0
...
@@ -69,7 +72,9 @@ class DelSuccessViewController: UIViewController {
...
@@ -69,7 +72,9 @@ class DelSuccessViewController: UIViewController {
@IBAction
func
closeClick
(
_
sender
:
Any
)
{
@IBAction
func
closeClick
(
_
sender
:
Any
)
{
vibrate
()
vibrate
()
self
.
dismiss
(
animated
:
true
)
self
.
dismiss
(
animated
:
true
)
{
self
.
closeCall
()
}
}
}
...
...
PhoneManager/Class/Page/Secret/PMShowImgVideoController.swift
View file @
6e9fa4c3
...
@@ -51,7 +51,6 @@ class PMShowImgVideoController: BaseViewController {
...
@@ -51,7 +51,6 @@ class PMShowImgVideoController: BaseViewController {
override
func
viewDidLoad
()
{
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
super
.
viewDidLoad
()
self
.
view
.
backgroundColor
=
UIColor
(
red
:
0.95
,
green
:
0.96
,
blue
:
0.99
,
alpha
:
1
)
self
.
view
.
backgroundColor
=
UIColor
(
red
:
0.95
,
green
:
0.96
,
blue
:
0.99
,
alpha
:
1
)
}
}
...
@@ -62,9 +61,13 @@ class PMShowImgVideoController: BaseViewController {
...
@@ -62,9 +61,13 @@ class PMShowImgVideoController: BaseViewController {
make
.
top
.
equalTo
(
titleView
.
snp
.
bottom
)
.
offset
(
20
)
make
.
top
.
equalTo
(
titleView
.
snp
.
bottom
)
.
offset
(
20
)
make
.
bottom
.
equalToSuperview
()
.
inset
(
100
+
(
cWindow
?
.
safeAreaInsets
.
bottom
??
0
))
make
.
bottom
.
equalToSuperview
()
.
inset
(
100
+
(
cWindow
?
.
safeAreaInsets
.
bottom
??
0
))
}
}
self
.
b
ottItems
.
snp
.
makeConstraints
{
make
in
self
.
b
ackView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
right
.
equalTo
(
MaxCollection
)
make
.
left
.
right
.
bottom
.
equalToSuperview
(
)
make
.
top
.
equalTo
(
MaxCollection
.
snp
.
bottom
)
make
.
top
.
equalTo
(
MaxCollection
.
snp
.
bottom
)
}
self
.
bottItems
.
snp
.
makeConstraints
{
make
in
make
.
left
.
right
.
equalToSuperview
()
.
inset
(
20
)
make
.
top
.
equalToSuperview
()
make
.
bottom
.
equalToSuperview
()
.
offset
(
-
(
cWindow
?
.
safeAreaInsets
.
bottom
??
0
))
make
.
bottom
.
equalToSuperview
()
.
offset
(
-
(
cWindow
?
.
safeAreaInsets
.
bottom
??
0
))
}
}
self
.
view
.
layoutIfNeeded
()
self
.
view
.
layoutIfNeeded
()
...
@@ -93,6 +96,7 @@ class PMShowImgVideoController: BaseViewController {
...
@@ -93,6 +96,7 @@ class PMShowImgVideoController: BaseViewController {
let
col
=
UICollectionView
(
frame
:
CGRect
(),
collectionViewLayout
:
flowlayout
)
let
col
=
UICollectionView
(
frame
:
CGRect
(),
collectionViewLayout
:
flowlayout
)
col
.
delegate
=
self
;
col
.
delegate
=
self
;
col
.
dataSource
=
self
;
col
.
dataSource
=
self
;
col
.
isPagingEnabled
=
true
col
.
showsHorizontalScrollIndicator
=
false
col
.
showsHorizontalScrollIndicator
=
false
col
.
backgroundColor
=
.
clear
col
.
backgroundColor
=
.
clear
col
.
isPagingEnabled
=
true
col
.
isPagingEnabled
=
true
...
@@ -115,9 +119,16 @@ class PMShowImgVideoController: BaseViewController {
...
@@ -115,9 +119,16 @@ class PMShowImgVideoController: BaseViewController {
col
.
register
(
PMShowItemCell
.
self
,
forCellWithReuseIdentifier
:
PMShowItemCellID
)
col
.
register
(
PMShowItemCell
.
self
,
forCellWithReuseIdentifier
:
PMShowItemCellID
)
col
.
register
(
UICollectionViewCell
.
self
,
forCellWithReuseIdentifier
:
"UICollectionViewCell"
)
col
.
register
(
UICollectionViewCell
.
self
,
forCellWithReuseIdentifier
:
"UICollectionViewCell"
)
col
.
showsHorizontalScrollIndicator
=
false
col
.
showsHorizontalScrollIndicator
=
false
v
iew
.
addSubview
(
col
)
backV
iew
.
addSubview
(
col
)
return
col
return
col
}()
}()
private
lazy
var
backView
:
UIView
=
{
let
v
=
UIView
()
v
.
backgroundColor
=
.
white
view
.
addSubview
(
v
)
return
v
}()
}
}
...
@@ -129,7 +140,6 @@ extension PMShowImgVideoController : UICollectionViewDelegate,UICollectionViewDa
...
@@ -129,7 +140,6 @@ extension PMShowImgVideoController : UICollectionViewDelegate,UICollectionViewDa
let
offsetx
=
MaxCollection
.
contentOffset
.
x
let
offsetx
=
MaxCollection
.
contentOffset
.
x
let
width
=
collectView
.
width
let
width
=
collectView
.
width
let
current
:
Int
=
Int
(
offsetx
/
width
)
let
current
:
Int
=
Int
(
offsetx
/
width
)
// currentIdx = current
bottItems
.
scrollToItem
(
at
:
IndexPath
(
row
:
current
,
section
:
0
),
at
:
.
left
,
animated
:
true
)
bottItems
.
scrollToItem
(
at
:
IndexPath
(
row
:
current
,
section
:
0
),
at
:
.
left
,
animated
:
true
)
}
}
}
}
...
@@ -221,7 +231,8 @@ extension PMShowImgVideoController : UICollectionViewDelegate,UICollectionViewDa
...
@@ -221,7 +231,8 @@ extension PMShowImgVideoController : UICollectionViewDelegate,UICollectionViewDa
self
.
homeDataSource
?[
indexPath
.
row
]
.
isSeleted
=
true
self
.
homeDataSource
?[
indexPath
.
row
]
.
isSeleted
=
true
self
.
selectSet
.
add
(
indexPath
.
row
)
self
.
selectSet
.
add
(
indexPath
.
row
)
}
}
self
.
MaxCollection
.
reloadData
()
// self.MaxCollection.reloadData()
cell
.
isCurrent
=
selectSet
.
contains
(
indexPath
.
row
)
self
.
bottItems
.
reloadData
()
self
.
bottItems
.
reloadData
()
}
}
return
cell
return
cell
...
@@ -240,7 +251,8 @@ extension PMShowImgVideoController : UICollectionViewDelegate,UICollectionViewDa
...
@@ -240,7 +251,8 @@ extension PMShowImgVideoController : UICollectionViewDelegate,UICollectionViewDa
self
.
homeDataSource
?[
indexPath
.
row
]
.
isSeleted
=
true
self
.
homeDataSource
?[
indexPath
.
row
]
.
isSeleted
=
true
self
.
selectSet
.
add
(
indexPath
.
row
)
self
.
selectSet
.
add
(
indexPath
.
row
)
}
}
self
.
MaxCollection
.
reloadData
()
// self.MaxCollection.reloadData()
cell
.
isCurrent
=
selectSet
.
contains
(
indexPath
.
row
)
self
.
bottItems
.
reloadData
()
self
.
bottItems
.
reloadData
()
}
}
return
cell
return
cell
...
...
PhoneManager/Class/Page/Secret/SecretSetViewController.swift
View file @
6e9fa4c3
...
@@ -110,6 +110,7 @@ class SecretSetViewController: BaseViewController, UITextFieldDelegate {
...
@@ -110,6 +110,7 @@ class SecretSetViewController: BaseViewController, UITextFieldDelegate {
if
secretType
==
.
del
{
if
secretType
==
.
del
{
// UserDefaults.standard.set("", forKey: SecretViewController.psKey)
// UserDefaults.standard.set("", forKey: SecretViewController.psKey)
SettingConfiguration
.
share
.
config
.
secret
=
""
SettingConfiguration
.
share
.
config
.
secret
=
""
SettingConfiguration
.
share
.
config
.
faceId
=
false
let
alert
=
UIAlertController
(
title
:
nil
,
message
:
"The PIN has been deleted"
,
preferredStyle
:
.
alert
)
let
alert
=
UIAlertController
(
title
:
nil
,
message
:
"The PIN has been deleted"
,
preferredStyle
:
.
alert
)
self
.
present
(
alert
,
animated
:
true
)
self
.
present
(
alert
,
animated
:
true
)
DispatchQueue
.
main
.
asyncAfter
(
deadline
:
.
now
()
+
1.5
)
{
DispatchQueue
.
main
.
asyncAfter
(
deadline
:
.
now
()
+
1.5
)
{
...
...
PhoneManager/Class/Page/Settings/View/SettingViewHeaderCell.swift
View file @
6e9fa4c3
...
@@ -27,7 +27,7 @@ class SettingViewHeaderCell : UITableViewCell {
...
@@ -27,7 +27,7 @@ class SettingViewHeaderCell : UITableViewCell {
label
.
text
=
"Phone Manager Pro Edition"
label
.
text
=
"Phone Manager Pro Edition"
}
}
label
.
font
=
UIFont
(
name
:
"PingFang SC-Bold"
,
size
:
18
)
label
.
font
=
UIFont
.
systemFont
(
ofSize
:
18
,
weight
:
.
bold
)
label
.
textColor
=
UIColor
(
red
:
0.2
,
green
:
0.2
,
blue
:
0.2
,
alpha
:
1
)
label
.
textColor
=
UIColor
(
red
:
0.2
,
green
:
0.2
,
blue
:
0.2
,
alpha
:
1
)
label
.
textAlignment
=
.
center
label
.
textAlignment
=
.
center
return
label
return
label
...
@@ -102,7 +102,7 @@ class SettingViewHeaderCell : UITableViewCell {
...
@@ -102,7 +102,7 @@ class SettingViewHeaderCell : UITableViewCell {
make
.
right
.
equalToSuperview
()
.
offset
(
-
15
)
make
.
right
.
equalToSuperview
()
.
offset
(
-
15
)
make
.
top
.
equalTo
(
fLabel
.
snp
.
bottom
)
.
offset
(
4
)
make
.
top
.
equalTo
(
fLabel
.
snp
.
bottom
)
.
offset
(
4
)
if
IAPManager
.
share
.
isSubscribed
==
false
{
if
IAPManager
.
share
.
isSubscribed
==
false
{
make
.
height
.
e
qualTo
(
20
)
make
.
height
.
greaterThanOrE
qualTo
(
20
)
}
else
{
}
else
{
make
.
height
.
equalTo
(
42
)
make
.
height
.
equalTo
(
42
)
}
}
...
...
PhoneManager/Class/Page/Settings/ViewController/SettingViewController.swift
View file @
6e9fa4c3
...
@@ -173,12 +173,13 @@ class SettingViewController : BaseViewController , UITableViewDelegate, UITableV
...
@@ -173,12 +173,13 @@ class SettingViewController : BaseViewController , UITableViewDelegate, UITableV
break
break
case
settingLabels
.
RemoveAfterImport
.
rawValue
:
case
settingLabels
.
RemoveAfterImport
.
rawValue
:
SettingConfiguration
.
share
.
config
.
removeImg
=
!
SettingConfiguration
.
share
.
config
.
removeImg
SettingConfiguration
.
share
.
config
.
removeImg
=
!
SettingConfiguration
.
share
.
config
.
removeImg
tableView
.
reloadRows
(
at
:
[
indexPath
],
with
:
.
none
)
let
cell
:
SettingSwitchCell
=
tableView
.
cellForRow
(
at
:
indexPath
)
as?
SettingSwitchCell
??
SettingSwitchCell
()
tableView
.
reloadData
()
cell
.
openImageView
.
isSelected
=
SettingConfiguration
.
share
.
config
.
removeImg
vibrate
()
vibrate
()
break
break
case
settingLabels
.
Widgets
.
rawValue
:
case
settingLabels
.
Widgets
.
rawValue
:
var
callblock
:(()
->
Void
)
=
{[
weak
self
]
in
let
callblock
:(()
->
Void
)
=
{[
weak
self
]
in
guard
let
self
=
self
else
{
return
}
guard
let
self
=
self
else
{
return
}
let
widget
=
WidgetViewController
()
let
widget
=
WidgetViewController
()
self
.
navigationController
?
.
pushViewController
(
widget
,
animated
:
true
)
self
.
navigationController
?
.
pushViewController
(
widget
,
animated
:
true
)
...
@@ -216,8 +217,8 @@ class SettingViewController : BaseViewController , UITableViewDelegate, UITableV
...
@@ -216,8 +217,8 @@ class SettingViewController : BaseViewController , UITableViewDelegate, UITableV
break
break
case
settingLabels
.
Vibration
.
rawValue
:
case
settingLabels
.
Vibration
.
rawValue
:
SettingConfiguration
.
share
.
config
.
vibration
=
!
(
SettingConfiguration
.
share
.
config
.
vibration
??
false
)
SettingConfiguration
.
share
.
config
.
vibration
=
!
(
SettingConfiguration
.
share
.
config
.
vibration
??
false
)
tableView
.
reloadRows
(
at
:
[
indexPath
],
with
:
.
none
)
let
cell
:
SettingSwitchCell
=
tableView
.
cellForRow
(
at
:
indexPath
)
as?
SettingSwitchCell
??
SettingSwitchCell
(
)
tableView
.
reloadData
()
cell
.
openImageView
.
isSelected
=
SettingConfiguration
.
share
.
config
.
vibration
??
false
vibrate
(
true
)
vibrate
(
true
)
break
break
case
settingLabels
.
Resumepurchase
.
rawValue
:
case
settingLabels
.
Resumepurchase
.
rawValue
:
...
@@ -278,14 +279,16 @@ class SettingViewController : BaseViewController , UITableViewDelegate, UITableV
...
@@ -278,14 +279,16 @@ class SettingViewController : BaseViewController , UITableViewDelegate, UITableV
PMFaceIDManger
.
authenticateWithFaceID
(
reason
:
"Unlock privacy space"
)
{[
weak
self
]
success
,
error
in
PMFaceIDManger
.
authenticateWithFaceID
(
reason
:
"Unlock privacy space"
)
{[
weak
self
]
success
,
error
in
if
success
{
if
success
{
SettingConfiguration
.
share
.
config
.
faceId
=
!
(
SettingConfiguration
.
share
.
config
.
faceId
??
false
)
SettingConfiguration
.
share
.
config
.
faceId
=
!
(
SettingConfiguration
.
share
.
config
.
faceId
??
false
)
self
?
.
tableView
.
reloadData
()
// self?.tableView.reloadData()
let
cell
:
SettingSwitchCell
=
self
?
.
tableView
.
cellForRow
(
at
:
indexPath
)
as?
SettingSwitchCell
??
SettingSwitchCell
()
cell
.
openImageView
.
isSelected
=
SettingConfiguration
.
share
.
config
.
faceId
??
false
}
}
}
}
}
}
}
else
{
}
else
{
SettingConfiguration
.
share
.
config
.
faceId
=
false
SettingConfiguration
.
share
.
config
.
faceId
=
false
self
.
tableView
.
reloadRows
(
at
:
[
indexPath
],
with
:
.
none
)
let
cell
:
SettingSwitchCell
=
tableView
.
cellForRow
(
at
:
indexPath
)
as?
SettingSwitchCell
??
SettingSwitchCell
(
)
tableView
.
reloadData
()
cell
.
openImageView
.
isSelected
=
SettingConfiguration
.
share
.
config
.
faceId
??
false
}
}
}
}
...
@@ -295,8 +298,8 @@ class SettingViewController : BaseViewController , UITableViewDelegate, UITableV
...
@@ -295,8 +298,8 @@ class SettingViewController : BaseViewController , UITableViewDelegate, UITableV
seting
.
Callback
=
{[
weak
self
]
success
in
seting
.
Callback
=
{[
weak
self
]
success
in
guard
let
self
=
self
else
{
return
}
guard
let
self
=
self
else
{
return
}
if
success
{
if
success
{
self
.
modelData
=
getSettingViewInfo
()
//
self.modelData = getSettingViewInfo()
self
.
tableView
.
reloadData
()
//
self.tableView.reloadData()
}
}
}
}
self
.
navigationController
?
.
pushViewController
(
seting
,
animated
:
true
)
self
.
navigationController
?
.
pushViewController
(
seting
,
animated
:
true
)
...
...
PhoneManager/Class/Session/Email/Controller/EmailFilterController.swift
View file @
6e9fa4c3
...
@@ -227,11 +227,14 @@ extension EmailFilterController : UITableViewDelegate,UITableViewDataSource {
...
@@ -227,11 +227,14 @@ extension EmailFilterController : UITableViewDelegate,UITableViewDataSource {
let
keyword
=
EmailKeywordController
()
let
keyword
=
EmailKeywordController
()
keyword
.
modalPresentationStyle
=
.
overFullScreen
keyword
.
modalPresentationStyle
=
.
overFullScreen
keyword
.
callblock
=
{
text
in
keyword
.
callblock
=
{
text
in
var
keywords
=
EmailFilterManager
.
share
.
keyword
if
text
.
count
>
0
{
keywords
.
append
(
text
)
var
keywords
=
EmailFilterManager
.
share
.
keyword
keywords
.
append
(
text
)
EmailFilterManager
.
share
.
keyword
=
keywords
tableView
.
reloadData
()
}
self
.
view
.
hideBlur
()
self
.
view
.
hideBlur
()
EmailFilterManager
.
share
.
keyword
=
keywords
tableView
.
reloadData
()
}
}
self
.
present
(
keyword
,
animated
:
true
)
self
.
present
(
keyword
,
animated
:
true
)
}
}
...
...
PhoneManager/Class/Session/Email/Controller/EmailKeywordController.swift
View file @
6e9fa4c3
...
@@ -99,6 +99,7 @@ class EmailKeywordController: UIViewController {
...
@@ -99,6 +99,7 @@ class EmailKeywordController: UIViewController {
}
}
}
}
}
else
{
}
else
{
self
.
callblock
(
""
)
self
.
dismiss
(
animated
:
true
)
self
.
dismiss
(
animated
:
true
)
}
}
}
}
...
...
PhoneManager/Class/Session/Email/View/EmailCleanListView.swift
View file @
6e9fa4c3
...
@@ -116,14 +116,19 @@ extension EmailCleanListView : UITableViewDataSource,UITableViewDelegate {
...
@@ -116,14 +116,19 @@ extension EmailCleanListView : UITableViewDataSource,UITableViewDelegate {
// 再次判断下
// 再次判断下
if
IAPManager
.
share
.
isSubscribed
==
false
{
if
IAPManager
.
share
.
isSubscribed
==
false
{
// 弹出提示框
// 弹出提示框
let
alertView
=
AdvTipSelectView
(
frame
:
self
.
bounds
)
let
alertView
=
AdvTipSelectView
()
alertView
.
selectType
=
.
selectTypeSetAnimation
alertView
.
selectType
=
.
selectTypeSetAnimation
alertView
.
getOtherInfoByType
()
alertView
.
getOtherInfoByType
()
self
.
addSubview
(
alertView
)
self
.
showBlur
()
self
.
responderViewController
()?
.
present
(
alertView
,
animated
:
true
)
alertView
.
selectClickCallback
=
{
isSure
in
alertView
.
selectClickCallback
=
{
isSure
in
self
.
popAdverTisement
()
alertView
.
dismiss
(
animated
:
true
)
AdvManager
.
shared
.
finisedCallBack
=
{
self
.
hideBlur
()
callblock
()
if
isSure
{
self
.
popAdverTisement
()
AdvManager
.
shared
.
finisedCallBack
=
{
callblock
()
}
}
}
}
}
}
else
{
}
else
{
...
...
PhoneManager/Class/Session/Email/View/EmailContentView.swift
View file @
6e9fa4c3
...
@@ -165,14 +165,19 @@ extension EmailContentView :UITableViewDelegate,UITableViewDataSource{
...
@@ -165,14 +165,19 @@ extension EmailContentView :UITableViewDelegate,UITableViewDataSource{
// 再次判断下
// 再次判断下
if
IAPManager
.
share
.
isSubscribed
==
false
{
if
IAPManager
.
share
.
isSubscribed
==
false
{
// 弹出提示框
// 弹出提示框
let
alertView
=
AdvTipSelectView
(
frame
:
self
.
bounds
)
let
alertView
=
AdvTipSelectView
()
alertView
.
selectType
=
.
selectTypeSetAnimation
alertView
.
selectType
=
.
selectTypeSetAnimation
alertView
.
getOtherInfoByType
()
alertView
.
getOtherInfoByType
()
self
.
addSubview
(
alertView
)
self
.
showBlur
()
self
.
responderViewController
()?
.
present
(
alertView
,
animated
:
true
)
alertView
.
selectClickCallback
=
{
isSure
in
alertView
.
selectClickCallback
=
{
isSure
in
self
.
popAdverTisement
()
alertView
.
dismiss
(
animated
:
true
)
AdvManager
.
shared
.
finisedCallBack
=
{
self
.
hideBlur
()
callblock
()
if
isSure
{
self
.
popAdverTisement
()
AdvManager
.
shared
.
finisedCallBack
=
{
callblock
()
}
}
}
}
}
}
else
{
}
else
{
...
...
PhoneManager/Class/Tool/Class/SystemCommentManager/SystemCommentManager.swift
View file @
6e9fa4c3
...
@@ -17,7 +17,7 @@ class SystemCommentManager {
...
@@ -17,7 +17,7 @@ class SystemCommentManager {
/// 弹窗评论
/// 弹窗评论
class
func
showCommentPage
(){
class
func
showCommentPage
(
_
view
:
UIView
){
if
let
date
=
UserDefaults
.
standard
.
object
(
forKey
:
SHOW_COMMENT_DATE
){
if
let
date
=
UserDefaults
.
standard
.
object
(
forKey
:
SHOW_COMMENT_DATE
){
// 如果是有时间,判断和当前时间是不是一致的,如果是一致
// 如果是有时间,判断和当前时间是不是一致的,如果是一致
let
calendar
=
Calendar
.
current
let
calendar
=
Calendar
.
current
...
@@ -34,18 +34,23 @@ class SystemCommentManager {
...
@@ -34,18 +34,23 @@ class SystemCommentManager {
if
let
isCommentInCurrentDay
=
UserDefaults
.
standard
.
object
(
forKey
:
SHOW_COMMENT_IN_CURRENT_DAY
){
if
let
isCommentInCurrentDay
=
UserDefaults
.
standard
.
object
(
forKey
:
SHOW_COMMENT_IN_CURRENT_DAY
){
let
temp
:
Bool
=
isCommentInCurrentDay
as!
Bool
let
temp
:
Bool
=
isCommentInCurrentDay
as!
Bool
if
!
temp
{
if
!
temp
{
showAction
()
showAction
(
view
)
}
}
}
else
{
}
else
{
showAction
()
showAction
(
view
)
}
}
}
}
}
}
/// 显示评价弹窗操作
/// 显示评价弹窗操作
private
class
func
showAction
(){
private
class
func
showAction
(
_
view
:
UIView
){
DispatchQueue
.
main
.
async
{
DispatchQueue
.
main
.
async
{
CustomRate
()
.
show
()
let
rate
=
CustomRate
()
view
.
showBlur
()
rate
.
view
.
callblock
=
{
view
.
hideBlur
()
}
rate
.
show
()
}
}
UserDefaults
.
standard
.
set
(
true
,
forKey
:
SHOW_COMMENT_IN_CURRENT_DAY
)
UserDefaults
.
standard
.
set
(
true
,
forKey
:
SHOW_COMMENT_IN_CURRENT_DAY
)
UserDefaults
.
standard
.
set
(
Date
(),
forKey
:
SHOW_COMMENT_DATE
)
UserDefaults
.
standard
.
set
(
Date
(),
forKey
:
SHOW_COMMENT_DATE
)
...
...
PhoneManager/Class/Tool/Common/Common.swift
View file @
6e9fa4c3
...
@@ -33,6 +33,8 @@ let iconWH:CGFloat = 28
...
@@ -33,6 +33,8 @@ let iconWH:CGFloat = 28
let
marginLR
:
CGFloat
=
15
let
marginLR
:
CGFloat
=
15
let
AniDuration
:
CGFloat
=
0.4
//颜色
//颜色
let
launchColor
:
String
=
"#7F33FF"
let
launchColor
:
String
=
"#7F33FF"
...
...
PhoneManager/Class/Tool/Extension.swift/ UIView+Extension.swift
View file @
6e9fa4c3
...
@@ -210,13 +210,13 @@ extension UIView {
...
@@ -210,13 +210,13 @@ extension UIView {
func
showBlur
()
->
Void
{
func
showBlur
()
->
Void
{
self
.
addSubview
(
blur
)
self
.
addSubview
(
blur
)
blur
.
frame
=
self
.
bounds
blur
.
frame
=
self
.
bounds
UIView
.
animate
(
withDuration
:
0.4
)
{
UIView
.
animate
(
withDuration
:
AniDuration
)
{
self
.
blur
.
alpha
=
1
self
.
blur
.
alpha
=
1
}
}
}
}
func
hideBlur
()
->
Void
{
func
hideBlur
()
->
Void
{
UIView
.
animate
(
withDuration
:
0.4
)
{
UIView
.
animate
(
withDuration
:
AniDuration
)
{
self
.
blur
.
alpha
=
0
self
.
blur
.
alpha
=
0
}
completion
:
{
su
in
}
completion
:
{
su
in
self
.
blur
.
removeFromSuperview
()
self
.
blur
.
removeFromSuperview
()
...
...
PhoneManager/Info.plist
View file @
6e9fa4c3
...
@@ -249,5 +249,7 @@
...
@@ -249,5 +249,7 @@
<
a
rr
a
y
>
<
a
rr
a
y
>
<
string
>
processing
<
/string
>
<
string
>
processing
<
/string
>
<
/
a
rr
a
y
>
<
/
a
rr
a
y
>
<
k
e
y
>
UIViewControllerBasedStatusBarAppearance
<
/k
e
y
>
<
tru
e
/
>
<
/
d
i
c
t
>
<
/
d
i
c
t
>
<
/plist
>
<
/plist
>
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