Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
S
SuperCleaner
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
SuperCleaner
Commits
8dfbba44
Commit
8dfbba44
authored
Aug 20, 2020
by
Mazy
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of gitlab.huolea.com:lmi/superclear
parents
cb99e28a
93bade83
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
303 additions
and
142 deletions
+303
-142
project.pbxproj
superCleaner.xcodeproj/project.pbxproj
+10
-0
Main.storyboard
superCleaner/Base.lproj/Main.storyboard
+17
-109
ICIAPViewController.m
superCleaner/Base/ICIAPViewController.m
+8
-2
ICHomeViewController.m
superCleaner/Home/Controller/ICHomeViewController.m
+79
-26
WKClearPhotoViewController.m
superCleaner/Home/Controller/WKClearPhotoViewController.m
+33
-0
SCHomeHeaderView.h
superCleaner/Home/View/SCHomeHeaderView.h
+23
-0
SCHomeHeaderView.m
superCleaner/Home/View/SCHomeHeaderView.m
+18
-0
SCHomeHeaderView.xib
superCleaner/Home/View/SCHomeHeaderView.xib
+101
-0
ICUserManager.m
superCleaner/Manager/ICUserManager.m
+11
-2
ICPurchaseManager.swift
superCleaner/Manager/Network/ICPurchaseManager.swift
+2
-2
ICNetworkSpeedViewController.m
superCleaner/Other/ICNetworkSpeedViewController.m
+1
-1
No files found.
superCleaner.xcodeproj/project.pbxproj
View file @
8dfbba44
...
@@ -159,6 +159,8 @@
...
@@ -159,6 +159,8 @@
A94C0E8624DA7044007F577D
/* UIImageView+Rotate.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A94C0E0724DA7044007F577D
/* UIImageView+Rotate.m */
;
};
A94C0E8624DA7044007F577D
/* UIImageView+Rotate.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A94C0E0724DA7044007F577D
/* UIImageView+Rotate.m */
;
};
A94C0E8724DA7044007F577D
/* UIColor+StoryBoard.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A94C0E0824DA7044007F577D
/* UIColor+StoryBoard.m */
;
};
A94C0E8724DA7044007F577D
/* UIColor+StoryBoard.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A94C0E0824DA7044007F577D
/* UIColor+StoryBoard.m */
;
};
A94C0E8E24DBABA9007F577D
/* ICIAPViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A94C0E8C24DBABA9007F577D
/* ICIAPViewController.m */
;
};
A94C0E8E24DBABA9007F577D
/* ICIAPViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A94C0E8C24DBABA9007F577D
/* ICIAPViewController.m */
;
};
A94C0F6F24DC0606007F577D
/* SCHomeHeaderView.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A94C0F6D24DC0606007F577D
/* SCHomeHeaderView.m */
;
};
A94C0F7024DC0606007F577D
/* SCHomeHeaderView.xib in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
A94C0F6E24DC0606007F577D
/* SCHomeHeaderView.xib */
;
};
/* End PBXBuildFile section */
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
/* Begin PBXFileReference section */
...
@@ -413,6 +415,9 @@
...
@@ -413,6 +415,9 @@
A94C0E0824DA7044007F577D
/* UIColor+StoryBoard.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
"UIColor+StoryBoard.m"
;
sourceTree
=
"<group>"
;
};
A94C0E0824DA7044007F577D
/* UIColor+StoryBoard.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
"UIColor+StoryBoard.m"
;
sourceTree
=
"<group>"
;
};
A94C0E8C24DBABA9007F577D
/* ICIAPViewController.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
ICIAPViewController.m
;
sourceTree
=
"<group>"
;
};
A94C0E8C24DBABA9007F577D
/* ICIAPViewController.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
ICIAPViewController.m
;
sourceTree
=
"<group>"
;
};
A94C0E8D24DBABA9007F577D
/* ICIAPViewController.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
ICIAPViewController.h
;
sourceTree
=
"<group>"
;
};
A94C0E8D24DBABA9007F577D
/* ICIAPViewController.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
ICIAPViewController.h
;
sourceTree
=
"<group>"
;
};
A94C0F6C24DC0606007F577D
/* SCHomeHeaderView.h */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
SCHomeHeaderView.h
;
sourceTree
=
"<group>"
;
};
A94C0F6D24DC0606007F577D
/* SCHomeHeaderView.m */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
SCHomeHeaderView.m
;
sourceTree
=
"<group>"
;
};
A94C0F6E24DC0606007F577D
/* SCHomeHeaderView.xib */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
file.xib
;
path
=
SCHomeHeaderView.xib
;
sourceTree
=
"<group>"
;
};
/* End PBXFileReference section */
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
/* Begin PBXFrameworksBuildPhase section */
...
@@ -729,6 +734,9 @@
...
@@ -729,6 +734,9 @@
A94C0D9124DA7043007F577D
/* WKSimilarPhotoCell.m */
,
A94C0D9124DA7043007F577D
/* WKSimilarPhotoCell.m */
,
A94C0D9724DA7043007F577D
/* WKSimilarPhotoHeadView.h */
,
A94C0D9724DA7043007F577D
/* WKSimilarPhotoHeadView.h */
,
A94C0D9224DA7043007F577D
/* WKSimilarPhotoHeadView.m */
,
A94C0D9224DA7043007F577D
/* WKSimilarPhotoHeadView.m */
,
A94C0F6C24DC0606007F577D
/* SCHomeHeaderView.h */
,
A94C0F6D24DC0606007F577D
/* SCHomeHeaderView.m */
,
A94C0F6E24DC0606007F577D
/* SCHomeHeaderView.xib */
,
);
);
path
=
View
;
path
=
View
;
sourceTree
=
"<group>"
;
sourceTree
=
"<group>"
;
...
@@ -1043,6 +1051,7 @@
...
@@ -1043,6 +1051,7 @@
A94C0D0424DA69B3007F577D
/* pets.mp3 in Resources */
,
A94C0D0424DA69B3007F577D
/* pets.mp3 in Resources */
,
A94C0E2C24DA7044007F577D
/* BatteryCareLocation.plist in Resources */
,
A94C0E2C24DA7044007F577D
/* BatteryCareLocation.plist in Resources */
,
A94C0E2F24DA7044007F577D
/* ICBatteryCareMainTextViewCell.xib in Resources */
,
A94C0E2F24DA7044007F577D
/* ICBatteryCareMainTextViewCell.xib in Resources */
,
A94C0F7024DC0606007F577D
/* SCHomeHeaderView.xib in Resources */
,
A94C0E7D24DA7044007F577D
/* ICContactManageViewCell.xib in Resources */
,
A94C0E7D24DA7044007F577D
/* ICContactManageViewCell.xib in Resources */
,
A94C0E2624DA7044007F577D
/* BatteryCareNotification.plist in Resources */
,
A94C0E2624DA7044007F577D
/* BatteryCareNotification.plist in Resources */
,
A94C0E2A24DA7044007F577D
/* BatteryCareLowPowerMode.plist in Resources */
,
A94C0E2A24DA7044007F577D
/* BatteryCareLowPowerMode.plist in Resources */
,
...
@@ -1152,6 +1161,7 @@
...
@@ -1152,6 +1161,7 @@
A94C0E2224DA7044007F577D
/* ICNetworkSpeedViewController.m in Sources */
,
A94C0E2224DA7044007F577D
/* ICNetworkSpeedViewController.m in Sources */
,
A94C0E4624DA7044007F577D
/* ICNormalPhotoViewController.m in Sources */
,
A94C0E4624DA7044007F577D
/* ICNormalPhotoViewController.m in Sources */
,
A94C0E2E24DA7044007F577D
/* SCNetWorkDashBoardView.swift in Sources */
,
A94C0E2E24DA7044007F577D
/* SCNetWorkDashBoardView.swift in Sources */
,
A94C0F6F24DC0606007F577D
/* SCHomeHeaderView.m in Sources */
,
A94C0E2724DA7044007F577D
/* ICDbTestViewController.m in Sources */
,
A94C0E2724DA7044007F577D
/* ICDbTestViewController.m in Sources */
,
A94C0E7324DA7044007F577D
/* ICContactListViewController.m in Sources */
,
A94C0E7324DA7044007F577D
/* ICContactListViewController.m in Sources */
,
A94C0E3424DA7044007F577D
/* ICBatteryCareMainTextViewCell.m in Sources */
,
A94C0E3424DA7044007F577D
/* ICBatteryCareMainTextViewCell.m in Sources */
,
...
...
superCleaner/Base.lproj/Main.storyboard
View file @
8dfbba44
This diff is collapsed.
Click to expand it.
superCleaner/Base/ICIAPViewController.m
View file @
8dfbba44
...
@@ -10,6 +10,7 @@
...
@@ -10,6 +10,7 @@
#import "superCleaner-Swift.h"
#import "superCleaner-Swift.h"
#import "ICWebViewController.h"
#import "ICWebViewController.h"
#import "ICIPAProductModel.h"
#import "ICIPAProductModel.h"
#import "Data.h"
@interface
ICIAPViewController
()
@interface
ICIAPViewController
()
...
@@ -48,6 +49,13 @@
...
@@ -48,6 +49,13 @@
UITapGestureRecognizer
*
yearTap
=
[[
UITapGestureRecognizer
alloc
]
initWithTarget
:
self
action
:
@selector
(
selectedYearAction
)];
UITapGestureRecognizer
*
yearTap
=
[[
UITapGestureRecognizer
alloc
]
initWithTarget
:
self
action
:
@selector
(
selectedYearAction
)];
[
self
.
yearContentView
addGestureRecognizer
:
yearTap
];
[
self
.
yearContentView
addGestureRecognizer
:
yearTap
];
self
.
weakPriceLabel
.
text
=
@"3天免费试用,之后"
;
Data
*
data
=
[[
Data
alloc
]
init
];
NSDictionary
*
dic
=
[[
data
Read
]
objectForKey
:
@"config"
];
if
(
dic
)
{
self
.
weakPriceLabel
.
text
=
[
dic
objectForKey
:
@"pay_3day_txt"
];
}
self
.
products
=
[
NSMutableArray
array
];
self
.
products
=
[
NSMutableArray
array
];
[
self
getIpaList
];
[
self
getIpaList
];
...
@@ -69,10 +77,8 @@
...
@@ -69,10 +77,8 @@
[
weakSelf
.
products
addObject
:
model
];
[
weakSelf
.
products
addObject
:
model
];
if
([
model
.
productId
containsString
:
@"week"
])
{
if
([
model
.
productId
containsString
:
@"week"
])
{
weakSelf
.
weakPeriodOfUseLabel
.
text
=
model
.
name
;
weakSelf
.
weakPeriodOfUseLabel
.
text
=
model
.
name
;
weakSelf
.
weakPriceLabel
.
text
=
model
.
payDesc
;
}
else
if
([
model
.
productId
containsString
:
@"year"
])
{
}
else
if
([
model
.
productId
containsString
:
@"year"
])
{
weakSelf
.
yearPeriodOfUseLabel
.
text
=
model
.
name
;
weakSelf
.
yearPeriodOfUseLabel
.
text
=
model
.
name
;
weakSelf
.
yearPriceLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@ (%@)"
,
model
.
payDesc
,
model
.
greyBgStr
];
}
}
}
}
}
}
...
...
superCleaner/Home/Controller/ICHomeViewController.m
View file @
8dfbba44
...
@@ -23,15 +23,18 @@
...
@@ -23,15 +23,18 @@
#import "ICPhotoManageViewController.h"
#import "ICPhotoManageViewController.h"
#import "ICContactsViewController.h"
#import "ICContactsViewController.h"
#import "ICCalendarManageController.h"
#import "ICCalendarManageController.h"
#import "SCHomeHeaderView.h"
@interface
ICHomeViewController
()
<
UICollectionViewDelegate
,
UICollectionViewDataSource
>
@interface
ICHomeViewController
()
<
UICollectionViewDelegate
,
UICollectionViewDataSource
>
@property
(
weak
,
nonatomic
)
IBOutlet
UILabel
*
usedSpaceScaleLabel
;
//@property (weak, nonatomic) IBOutlet UILabel *usedSpaceScaleLabel;
@property
(
weak
,
nonatomic
)
IBOutlet
UILabel
*
spacePercentLabel
;
//@property (weak, nonatomic) IBOutlet UILabel *spacePercentLabel;
@property
(
weak
,
nonatomic
)
IBOutlet
UIButton
*
smartClearButton
;
//@property (weak, nonatomic) IBOutlet UIButton *smartClearButton;
@property
(
weak
,
nonatomic
)
IBOutlet
UIImageView
*
cycleImageView
;
//@property (weak, nonatomic) IBOutlet UIImageView *cycleImageView;
@property
(
weak
,
nonatomic
)
IBOutlet
UIButton
*
manualButton
;
//@property (weak, nonatomic) IBOutlet UIButton *manualButton;
@property
(
weak
,
nonatomic
)
IBOutlet
UICollectionView
*
collectionView
;
@property
(
weak
,
nonatomic
)
IBOutlet
UICollectionView
*
collectionView
;
@property
(
strong
,
nonatomic
)
SCHomeHeaderView
*
headerView
;
@property
(
strong
,
nonatomic
)
NSArray
*
dataSource
;
@property
(
strong
,
nonatomic
)
NSArray
*
dataSource
;
@end
@end
...
@@ -51,8 +54,8 @@
...
@@ -51,8 +54,8 @@
@{
@"image"
:
@""
,
@"title"
:
@""
,
@"details"
:
@""
}];
@{
@"image"
:
@""
,
@"title"
:
@""
,
@"details"
:
@""
}];
[
self
setupUI
];
[
self
setupUI
];
[
self
getDivceSize
];
//
[self getDivceSize];
[
self
rotateAction
];
//
[self rotateAction];
[[
ICUserManager
shared
]
loginAndGetUserInfo
:
^
(
ZTUserInfoModel
*
_Nonnull
model
)
{
[[
ICUserManager
shared
]
loginAndGetUserInfo
:
^
(
ZTUserInfoModel
*
_Nonnull
model
)
{
[[
ICUserManager
shared
]
getServiceInfo
];
[[
ICUserManager
shared
]
getServiceInfo
];
...
@@ -75,7 +78,7 @@
...
@@ -75,7 +78,7 @@
-
(
void
)
viewDidAppear
:
(
BOOL
)
animated
{
-
(
void
)
viewDidAppear
:
(
BOOL
)
animated
{
[
super
viewDidAppear
:
animated
];
[
super
viewDidAppear
:
animated
];
[
self
.
smartClearButton
addRadarAnimation
];
// [self.headerView
.smartClearButton addRadarAnimation];
}
}
-
(
void
)
viewWillAppear
:
(
BOOL
)
animated
{
-
(
void
)
viewWillAppear
:
(
BOOL
)
animated
{
...
@@ -85,7 +88,7 @@
...
@@ -85,7 +88,7 @@
-
(
void
)
viewWillDisappear
:
(
BOOL
)
animated
{
-
(
void
)
viewWillDisappear
:
(
BOOL
)
animated
{
[
super
viewWillDisappear
:
animated
];
[
super
viewWillDisappear
:
animated
];
[
self
.
smartClearButton
removeRadarAnimation
];
[
self
.
headerView
.
smartClearButton
removeRadarAnimation
];
}
}
-
(
void
)
setupUI
{
-
(
void
)
setupUI
{
...
@@ -106,25 +109,23 @@
...
@@ -106,25 +109,23 @@
[
self
.
view
layoutIfNeeded
];
[
self
.
view
layoutIfNeeded
];
[
self
.
view
layoutSubviews
];
[
self
.
view
layoutSubviews
];
self
.
smartClearButton
.
layer
.
cornerRadius
=
self
.
smartClearButton
.
frame
.
size
.
height
/
2
;
self
.
smartClearButton
.
radarColor
=
kMassColor
;
self
.
smartClearButton
.
radarBorderColor
=
kMassColor
;
UICollectionViewFlowLayout
*
layout
=
[[
UICollectionViewFlowLayout
alloc
]
init
];
UICollectionViewFlowLayout
*
layout
=
[[
UICollectionViewFlowLayout
alloc
]
init
];
layout
.
itemSize
=
CGSizeMake
((
KScreenWidth
-
12
)
/
2
,
KScaleWidth
(
78
));
layout
.
itemSize
=
CGSizeMake
((
KScreenWidth
-
20
)
/
2
,
KScaleWidth
(
78
));
layout
.
minimumLineSpacing
=
0
;
layout
.
minimumLineSpacing
=
0
;
layout
.
minimumInteritemSpacing
=
0
;
layout
.
minimumInteritemSpacing
=
0
;
layout
.
sectionInset
=
UIEdgeInsetsMake
(
0
,
0
,
0
,
0
);
layout
.
sectionInset
=
UIEdgeInsetsMake
(
0
,
0
,
0
,
0
);
_collectionView
.
collectionViewLayout
=
layout
;
_collectionView
.
collectionViewLayout
=
layout
;
_collectionView
.
delegate
=
self
;
_collectionView
.
delegate
=
self
;
_collectionView
.
dataSource
=
self
;
_collectionView
.
dataSource
=
self
;
_collectionView
.
showsVerticalScrollIndicator
=
NO
;
// [_collectionView registerNib:[UINib nibWithNibName:@"ZJChooseIconCell" bundle:nil] forCellWithReuseIdentifier:@"cell"];
// [_collectionView registerNib:[UINib nibWithNibName:@"ZJChooseIconCell" bundle:nil] forCellWithReuseIdentifier:@"cell"];
[
_collectionView
registerNib
:[
UINib
nibWithNibName
:
@"SCHomeHeaderView"
bundle
:
nil
]
forSupplementaryViewOfKind
:
UICollectionElementKindSectionHeader
withReuseIdentifier
:
@"SCHomeHeaderView"
];
}
}
//设置一个函数 便于嵌套使用
//设置一个函数 便于嵌套使用
-
(
void
)
rotateAction
{
-
(
void
)
rotateAction
{
[
UIView
animateWithDuration
:
2
delay
:
0
options
:
UIViewAnimationOptionCurveLinear
animations
:^
{
[
UIView
animateWithDuration
:
2
delay
:
0
options
:
UIViewAnimationOptionCurveLinear
animations
:^
{
self
.
cycleImageView
.
transform
=
CGAffineTransformRotate
(
self
.
cycleImageView
.
transform
,
M_PI
);
self
.
headerView
.
cycleImageView
.
transform
=
CGAffineTransformRotate
(
self
.
headerView
.
cycleImageView
.
transform
,
M_PI
);
}
completion
:^
(
BOOL
finished
)
{
}
completion
:^
(
BOOL
finished
)
{
[
self
rotateAction
];
[
self
rotateAction
];
}];
}];
...
@@ -152,9 +153,8 @@
...
@@ -152,9 +153,8 @@
NSLog
(
@"%.1f/%.0f"
,
usedMem
,
totalMem
);
NSLog
(
@"%.1f/%.0f"
,
usedMem
,
totalMem
);
NSLog
(
@"%.2f"
,
usedMem
/
totalMem
);
NSLog
(
@"%.2f"
,
usedMem
/
totalMem
);
self
.
usedSpaceScaleLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@ %.0f%%"
,
ICLocalized
(
@"Used"
),
[[
ICDiskKit
takenSpace
]
floatValue
]
/
totalMem
*
100
];
self
.
headerView
.
usedSpaceScaleLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@ %.0f%%"
,
ICLocalized
(
@"Used"
),
[[
ICDiskKit
takenSpace
]
floatValue
]
/
totalMem
*
100
];
self
.
spacePercentLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@/%.0fGB"
,
[
ICDiskKit
takenSpace
],
totalMem
];
self
.
headerView
.
spacePercentLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@/%.0fGB"
,
[
ICDiskKit
takenSpace
],
totalMem
];
}
}
// 智能清理
// 智能清理
...
@@ -260,6 +260,35 @@
...
@@ -260,6 +260,35 @@
return
cell
;
return
cell
;
}
}
-
(
UICollectionReusableView
*
)
collectionView
:
(
UICollectionView
*
)
collectionView
viewForSupplementaryElementOfKind
:
(
NSString
*
)
kind
atIndexPath
:
(
NSIndexPath
*
)
indexPath
{
if
(
kind
==
UICollectionElementKindSectionHeader
)
{
SCHomeHeaderView
*
header
=
[
collectionView
dequeueReusableSupplementaryViewOfKind
:
kind
withReuseIdentifier
:
@"SCHomeHeaderView"
forIndexPath
:
indexPath
];
header
.
backgroundColor
=
[
UIColor
whiteColor
];
self
.
headerView
=
header
;
self
.
headerView
.
frame
=
CGRectMake
(
0
,
0
,
KScreenWidth
-
20
,
151
+
KScaleWidth
(
168
));
[
self
.
headerView
layoutIfNeeded
];
[
self
.
headerView
layoutSubviews
];
self
.
headerView
.
smartClearButton
.
layer
.
cornerRadius
=
self
.
headerView
.
smartClearButton
.
frame
.
size
.
height
/
2
;
self
.
headerView
.
smartClearButton
.
radarColor
=
kMassColor
;
self
.
headerView
.
smartClearButton
.
radarBorderColor
=
kMassColor
;
[
self
.
headerView
.
smartClearButton
addRadarAnimation
];
[
self
rotateAction
];
[
self
getDivceSize
];
[
self
.
headerView
.
smartClearButton
addTarget
:
self
action
:
@selector
(
smartClearAction
:
)
forControlEvents
:
(
UIControlEventTouchUpInside
)];
[
self
.
headerView
.
manualButton
addTarget
:
self
action
:
@selector
(
smartClearAction
:
)
forControlEvents
:
(
UIControlEventTouchUpInside
)];
return
self
.
headerView
;
}
return
nil
;
}
-
(
CGSize
)
collectionView
:
(
UICollectionView
*
)
collectionView
layout
:
(
UICollectionViewLayout
*
)
collectionViewLayout
referenceSizeForHeaderInSection
:
(
NSInteger
)
section
{
return
CGSizeMake
(
KScreenWidth
-
20
,
151
+
KScaleWidth
(
168
));
}
-
(
void
)
collectionView
:
(
UICollectionView
*
)
collectionView
didSelectItemAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
-
(
void
)
collectionView
:
(
UICollectionView
*
)
collectionView
didSelectItemAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
[
collectionView
deselectItemAtIndexPath
:
indexPath
animated
:
YES
];
[
collectionView
deselectItemAtIndexPath
:
indexPath
animated
:
YES
];
...
@@ -306,26 +335,50 @@
...
@@ -306,26 +335,50 @@
break
;
break
;
case
3
:
case
3
:
{
{
ICCleanDustViewController
*
vc
=
[[
UIStoryboard
storyboardWithName
:
@"Main"
bundle
:
nil
]
instantiateViewControllerWithIdentifier
:
@"ICCleanDustViewController"
];
if
([
ICUserManager
shared
].
isMember
)
{
[
self
.
navigationController
pushViewController
:
vc
animated
:
true
];
ICCleanDustViewController
*
vc
=
[[
UIStoryboard
storyboardWithName
:
@"Main"
bundle
:
nil
]
instantiateViewControllerWithIdentifier
:
@"ICCleanDustViewController"
];
[
self
.
navigationController
pushViewController
:
vc
animated
:
true
];
}
else
{
ICIAPViewController
*
iapVC
=
[[
UIStoryboard
storyboardWithName
:
@"Main"
bundle
:
nil
]
instantiateViewControllerWithIdentifier
:
@"ICIAPViewController"
];
ICNavigationController
*
navc
=
[[
ICNavigationController
alloc
]
initWithRootViewController
:
iapVC
];
[
self
presentViewController
:
navc
animated
:
true
completion
:
nil
];
}
}
}
break
;
break
;
case
4
:
case
4
:
{
{
ICNetworkSpeedViewController
*
vc
=
[[
UIStoryboard
storyboardWithName
:
@"Main"
bundle
:
nil
]
instantiateViewControllerWithIdentifier
:
@"ICNetworkSpeedViewController"
];
if
([
ICUserManager
shared
].
isMember
)
{
[
self
.
navigationController
pushViewController
:
vc
animated
:
true
];
ICNetworkSpeedViewController
*
vc
=
[[
UIStoryboard
storyboardWithName
:
@"Main"
bundle
:
nil
]
instantiateViewControllerWithIdentifier
:
@"ICNetworkSpeedViewController"
];
[
self
.
navigationController
pushViewController
:
vc
animated
:
true
];
}
else
{
ICIAPViewController
*
iapVC
=
[[
UIStoryboard
storyboardWithName
:
@"Main"
bundle
:
nil
]
instantiateViewControllerWithIdentifier
:
@"ICIAPViewController"
];
ICNavigationController
*
navc
=
[[
ICNavigationController
alloc
]
initWithRootViewController
:
iapVC
];
[
self
presentViewController
:
navc
animated
:
true
completion
:
nil
];
}
}
}
break
;
break
;
case
5
:
case
5
:
{
{
ICDbTestViewController
*
vc
=
[[
UIStoryboard
storyboardWithName
:
@"Main"
bundle
:
nil
]
instantiateViewControllerWithIdentifier
:
@"ICDbTestViewController"
];
if
([
ICUserManager
shared
].
isMember
)
{
[
self
.
navigationController
pushViewController
:
vc
animated
:
true
];
ICDbTestViewController
*
vc
=
[[
UIStoryboard
storyboardWithName
:
@"Main"
bundle
:
nil
]
instantiateViewControllerWithIdentifier
:
@"ICDbTestViewController"
];
[
self
.
navigationController
pushViewController
:
vc
animated
:
true
];
}
else
{
ICIAPViewController
*
iapVC
=
[[
UIStoryboard
storyboardWithName
:
@"Main"
bundle
:
nil
]
instantiateViewControllerWithIdentifier
:
@"ICIAPViewController"
];
ICNavigationController
*
navc
=
[[
ICNavigationController
alloc
]
initWithRootViewController
:
iapVC
];
[
self
presentViewController
:
navc
animated
:
true
completion
:
nil
];
}
}
}
break
;
break
;
case
6
:
case
6
:
{
{
ICBatteryCareViewController
*
vc
=
[[
ICBatteryCareViewController
alloc
]
init
];
if
([
ICUserManager
shared
].
isMember
)
{
[
self
.
navigationController
pushViewController
:
vc
animated
:
true
];
ICBatteryCareViewController
*
vc
=
[[
ICBatteryCareViewController
alloc
]
init
];
[
self
.
navigationController
pushViewController
:
vc
animated
:
true
];
}
else
{
ICIAPViewController
*
iapVC
=
[[
UIStoryboard
storyboardWithName
:
@"Main"
bundle
:
nil
]
instantiateViewControllerWithIdentifier
:
@"ICIAPViewController"
];
ICNavigationController
*
navc
=
[[
ICNavigationController
alloc
]
initWithRootViewController
:
iapVC
];
[
self
presentViewController
:
navc
animated
:
true
completion
:
nil
];
}
}
}
break
;
break
;
default
:
default
:
...
...
superCleaner/Home/Controller/WKClearPhotoViewController.m
View file @
8dfbba44
...
@@ -103,6 +103,39 @@
...
@@ -103,6 +103,39 @@
_similarPhotoContentView
.
backgroundColor
=
kMassColorAlpha
(
0
.
15
);
_similarPhotoContentView
.
backgroundColor
=
kMassColorAlpha
(
0
.
15
);
_similarVideoContentView
.
backgroundColor
=
kMassColorAlpha
(
0
.
15
);
_similarVideoContentView
.
backgroundColor
=
kMassColorAlpha
(
0
.
15
);
_screenshotContentView
.
tag
=
0x8c
+
1
;
_livePhotoContentView
.
tag
=
0x8c
+
3
;
_similarPhotoContentView
.
tag
=
0x8c
;
_similarVideoContentView
.
tag
=
0x8c
+
2
;
UITapGestureRecognizer
*
tap
=
[[
UITapGestureRecognizer
alloc
]
initWithTarget
:
self
action
:
@selector
(
viewTapGes
:
)];
UITapGestureRecognizer
*
tap1
=
[[
UITapGestureRecognizer
alloc
]
initWithTarget
:
self
action
:
@selector
(
viewTapGes
:
)];
UITapGestureRecognizer
*
tap2
=
[[
UITapGestureRecognizer
alloc
]
initWithTarget
:
self
action
:
@selector
(
viewTapGes
:
)];
UITapGestureRecognizer
*
tap3
=
[[
UITapGestureRecognizer
alloc
]
initWithTarget
:
self
action
:
@selector
(
viewTapGes
:
)];
[
_screenshotContentView
addGestureRecognizer
:
tap
];
[
_livePhotoContentView
addGestureRecognizer
:
tap1
];
[
_similarPhotoContentView
addGestureRecognizer
:
tap2
];
[
_similarVideoContentView
addGestureRecognizer
:
tap3
];
}
-
(
void
)
viewTapGes
:
(
UITapGestureRecognizer
*
)
ges
{
switch
(
ges
.
view
.
tag
-
0x8c
)
{
case
0
:
[
self
similarPhotoDetailAction
];
break
;
case
1
:
[
self
screenshotDetailAction
];
break
;
case
2
:
break
;
case
3
:
[
self
livePhotoDetailAction
];
break
;
default
:
break
;
}
}
}
-
(
void
)
updateUI
{
-
(
void
)
updateUI
{
...
...
superCleaner/Home/View/SCHomeHeaderView.h
0 → 100644
View file @
8dfbba44
//
// SCHomeHeaderView.h
// superCleaner
//
// Created by 明津李 on 2020/8/6.
// Copyright © 2020 Mazy. All rights reserved.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface
SCHomeHeaderView
:
UICollectionReusableView
@property
(
weak
,
nonatomic
)
IBOutlet
UILabel
*
usedSpaceScaleLabel
;
@property
(
weak
,
nonatomic
)
IBOutlet
UILabel
*
spacePercentLabel
;
@property
(
weak
,
nonatomic
)
IBOutlet
UIButton
*
smartClearButton
;
@property
(
weak
,
nonatomic
)
IBOutlet
UIImageView
*
cycleImageView
;
@property
(
weak
,
nonatomic
)
IBOutlet
UIButton
*
manualButton
;
@end
NS_ASSUME_NONNULL_END
superCleaner/Home/View/SCHomeHeaderView.m
0 → 100644
View file @
8dfbba44
//
// SCHomeHeaderView.m
// superCleaner
//
// Created by 明津李 on 2020/8/6.
// Copyright © 2020 Mazy. All rights reserved.
//
#import "SCHomeHeaderView.h"
@implementation
SCHomeHeaderView
-
(
void
)
awakeFromNib
{
[
super
awakeFromNib
];
// Initialization code
}
@end
superCleaner/Home/View/SCHomeHeaderView.xib
0 → 100644
View file @
8dfbba44
<?xml version="1.0" encoding="UTF-8"?>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.XIB"
version=
"3.0"
toolsVersion=
"16097.2"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
useTraitCollections=
"YES"
useSafeAreas=
"YES"
colorMatched=
"YES"
>
<device
id=
"retina6_1"
orientation=
"portrait"
appearance=
"light"
/>
<dependencies>
<deployment
identifier=
"iOS"
/>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"16087"
/>
<capability
name=
"Safe area layout guides"
minToolsVersion=
"9.0"
/>
<capability
name=
"documents saved in the Xcode 8 format"
minToolsVersion=
"8.0"
/>
</dependencies>
<objects>
<placeholder
placeholderIdentifier=
"IBFilesOwner"
id=
"-1"
userLabel=
"File's Owner"
/>
<placeholder
placeholderIdentifier=
"IBFirstResponder"
id=
"-2"
customClass=
"UIResponder"
/>
<collectionReusableView
opaque=
"NO"
clipsSubviews=
"YES"
multipleTouchEnabled=
"YES"
contentMode=
"center"
reuseIdentifier=
"SCHomeHeaderView"
id=
"U6b-Vx-4bR"
customClass=
"SCHomeHeaderView"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"415"
height=
"350"
/>
<autoresizingMask
key=
"autoresizingMask"
/>
<subviews>
<imageView
clipsSubviews=
"YES"
userInteractionEnabled=
"NO"
contentMode=
"scaleAspectFit"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
image=
"home_cycle_bg_img"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"Zv4-WU-omb"
>
<rect
key=
"frame"
x=
"109.5"
y=
"25"
width=
"196"
height=
"196.5"
/>
<constraints>
<constraint
firstAttribute=
"width"
secondItem=
"Zv4-WU-omb"
secondAttribute=
"height"
id=
"8bM-lL-T2A"
/>
</constraints>
</imageView>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"52.3/64 GB"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"zHw-24-34Q"
>
<rect
key=
"frame"
x=
"170.5"
y=
"241.5"
width=
"74.5"
height=
"17"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
pointSize=
"14"
/>
<nil
key=
"textColor"
/>
<nil
key=
"highlightedColor"
/>
</label>
<button
clipsSubviews=
"YES"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"center"
contentVerticalAlignment=
"center"
lineBreakMode=
"middleTruncation"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"kdu-zn-cpc"
>
<rect
key=
"frame"
x=
"113.5"
y=
"272.5"
width=
"188"
height=
"50"
/>
<state
key=
"normal"
title=
"立即清理"
backgroundImage=
"home_button_bg"
>
<color
key=
"titleColor"
red=
"0.20392156859999999"
green=
"0.20392156859999999"
blue=
"0.20392156859999999"
alpha=
"1"
colorSpace=
"calibratedRGB"
/>
</state>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute
type=
"boolean"
keyPath=
"kMassColor"
value=
"YES"
/>
</userDefinedRuntimeAttributes>
</button>
<button
opaque=
"NO"
contentMode=
"scaleToFill"
contentHorizontalAlignment=
"center"
contentVerticalAlignment=
"center"
buttonType=
"roundedRect"
lineBreakMode=
"middleTruncation"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"1jd-Wk-3GP"
>
<rect
key=
"frame"
x=
"152"
y=
"67.5"
width=
"111"
height=
"111"
/>
<color
key=
"backgroundColor"
red=
"0.14901960780000001"
green=
"0.74117647060000003"
blue=
"0.36078431370000003"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
<constraints>
<constraint
firstAttribute=
"width"
secondItem=
"1jd-Wk-3GP"
secondAttribute=
"height"
id=
"8Oy-XT-kKI"
/>
</constraints>
<fontDescription
key=
"fontDescription"
type=
"system"
weight=
"medium"
pointSize=
"16"
/>
<state
key=
"normal"
>
<color
key=
"titleColor"
red=
"1"
green=
"1"
blue=
"1"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"displayP3"
/>
</state>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute
type=
"color"
keyPath=
"massBackgroundColor"
>
<color
key=
"value"
white=
"0.0"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"genericGamma22GrayColorSpace"
/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</button>
<stackView
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"scaleToFill"
axis=
"vertical"
distribution=
"fillEqually"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"ggP-Tm-Bko"
>
<rect
key=
"frame"
x=
"191"
y=
"113.5"
width=
"33.5"
height=
"19.5"
/>
<subviews>
<label
opaque=
"NO"
userInteractionEnabled=
"NO"
contentMode=
"left"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
text=
"82%"
textAlignment=
"natural"
lineBreakMode=
"tailTruncation"
baselineAdjustment=
"alignBaselines"
adjustsFontSizeToFit=
"NO"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"yC1-rk-Hns"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"33.5"
height=
"19.5"
/>
<fontDescription
key=
"fontDescription"
type=
"system"
weight=
"medium"
pointSize=
"16"
/>
<color
key=
"textColor"
red=
"0.1333333333"
green=
"0.16078431369999999"
blue=
"0.23921568630000001"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
<nil
key=
"highlightedColor"
/>
</label>
</subviews>
</stackView>
</subviews>
<constraints>
<constraint
firstItem=
"ggP-Tm-Bko"
firstAttribute=
"centerX"
secondItem=
"1jd-Wk-3GP"
secondAttribute=
"centerX"
id=
"4Jk-2s-Isl"
/>
<constraint
firstItem=
"zHw-24-34Q"
firstAttribute=
"centerX"
secondItem=
"Zv4-WU-omb"
secondAttribute=
"centerX"
id=
"5lQ-Pu-Nbh"
/>
<constraint
firstItem=
"1jd-Wk-3GP"
firstAttribute=
"centerY"
secondItem=
"Zv4-WU-omb"
secondAttribute=
"centerY"
id=
"B66-oI-GDt"
/>
<constraint
firstItem=
"ggP-Tm-Bko"
firstAttribute=
"centerX"
secondItem=
"U6b-Vx-4bR"
secondAttribute=
"centerX"
id=
"CGu-e6-A6F"
/>
<constraint
firstItem=
"1jd-Wk-3GP"
firstAttribute=
"centerX"
secondItem=
"Zv4-WU-omb"
secondAttribute=
"centerX"
id=
"GUh-Om-2FR"
/>
<constraint
firstItem=
"zHw-24-34Q"
firstAttribute=
"centerX"
secondItem=
"U6b-Vx-4bR"
secondAttribute=
"centerX"
id=
"GjT-uU-6bX"
/>
<constraint
firstItem=
"Zv4-WU-omb"
firstAttribute=
"top"
secondItem=
"U6b-Vx-4bR"
secondAttribute=
"top"
constant=
"25"
id=
"Gjn-0n-8YZ"
/>
<constraint
firstItem=
"1jd-Wk-3GP"
firstAttribute=
"width"
secondItem=
"Zv4-WU-omb"
secondAttribute=
"width"
multiplier=
"95:168"
id=
"HQJ-iW-vZ9"
/>
<constraint
firstItem=
"kdu-zn-cpc"
firstAttribute=
"centerX"
secondItem=
"U6b-Vx-4bR"
secondAttribute=
"centerX"
id=
"HcD-OE-9YK"
/>
<constraint
firstItem=
"ggP-Tm-Bko"
firstAttribute=
"centerY"
secondItem=
"1jd-Wk-3GP"
secondAttribute=
"centerY"
id=
"Stx-Ch-vQ5"
/>
<constraint
firstItem=
"kdu-zn-cpc"
firstAttribute=
"top"
secondItem=
"zHw-24-34Q"
secondAttribute=
"bottom"
constant=
"14"
id=
"Vb3-jJ-47a"
/>
<constraint
firstItem=
"zHw-24-34Q"
firstAttribute=
"top"
secondItem=
"Zv4-WU-omb"
secondAttribute=
"bottom"
constant=
"20"
id=
"Vy1-Zq-bGV"
/>
<constraint
firstItem=
"Zv4-WU-omb"
firstAttribute=
"width"
secondItem=
"U6b-Vx-4bR"
secondAttribute=
"width"
multiplier=
"168:355"
id=
"X6Y-WL-zDQ"
/>
<constraint
firstItem=
"Zv4-WU-omb"
firstAttribute=
"width"
secondItem=
"Zv4-WU-omb"
secondAttribute=
"height"
id=
"ZcV-l7-Tmo"
/>
<constraint
firstItem=
"kdu-zn-cpc"
firstAttribute=
"centerX"
secondItem=
"Zv4-WU-omb"
secondAttribute=
"centerX"
id=
"Zcs-zK-Anc"
/>
<constraint
firstItem=
"1jd-Wk-3GP"
firstAttribute=
"centerX"
secondItem=
"U6b-Vx-4bR"
secondAttribute=
"centerX"
id=
"gbh-51-ooP"
/>
<constraint
firstItem=
"1jd-Wk-3GP"
firstAttribute=
"width"
secondItem=
"1jd-Wk-3GP"
secondAttribute=
"height"
id=
"jjh-CL-fBu"
/>
<constraint
firstItem=
"Zv4-WU-omb"
firstAttribute=
"centerX"
secondItem=
"U6b-Vx-4bR"
secondAttribute=
"centerX"
id=
"ulc-67-RPm"
/>
</constraints>
<viewLayoutGuide
key=
"safeArea"
id=
"9Gg-ye-v9C"
/>
<connections>
<outlet
property=
"cycleImageView"
destination=
"Zv4-WU-omb"
id=
"7R7-Y5-uew"
/>
<outlet
property=
"manualButton"
destination=
"kdu-zn-cpc"
id=
"TVz-VU-f4f"
/>
<outlet
property=
"smartClearButton"
destination=
"1jd-Wk-3GP"
id=
"MG6-5N-v0z"
/>
<outlet
property=
"spacePercentLabel"
destination=
"zHw-24-34Q"
id=
"MPT-Vt-mQ8"
/>
<outlet
property=
"usedSpaceScaleLabel"
destination=
"yC1-rk-Hns"
id=
"jN8-3G-tXo"
/>
</connections>
<point
key=
"canvasLocation"
x=
"306.52173913043481"
y=
"98.4375"
/>
</collectionReusableView>
</objects>
<resources>
<image
name=
"home_button_bg"
width=
"188"
height=
"50"
/>
<image
name=
"home_cycle_bg_img"
width=
"168"
height=
"168"
/>
</resources>
</document>
superCleaner/Manager/ICUserManager.m
View file @
8dfbba44
...
@@ -51,10 +51,16 @@ static ICUserManager * manager;
...
@@ -51,10 +51,16 @@ static ICUserManager * manager;
}
}
-
(
BOOL
)
isMember
{
-
(
BOOL
)
isMember
{
NSString
*
dateString
=
[[
NSUserDefaults
standardUserDefaults
]
valueForKeyPath
:
@"expiryDate"
];
NSString
*
dateString
=
[[
NSUserDefaults
standardUserDefaults
]
valueForKeyPath
:
@"expiryDate"
];
if
(
dateString
.
length
<=
0
)
{
if
(
dateString
.
length
<=
0
)
{
#ifdef DEBUG
return
false
;
#else
return
self
.
model
.
isMember
;
return
self
.
model
.
isMember
;
#endif
}
}
NSDateFormatter
*
formatter
=
[[
NSDateFormatter
alloc
]
init
];
NSDateFormatter
*
formatter
=
[[
NSDateFormatter
alloc
]
init
];
formatter
.
dateFormat
=
@"yyyy-MM-dd HH:mm"
;
formatter
.
dateFormat
=
@"yyyy-MM-dd HH:mm"
;
NSDate
*
expiryDate
=
[
formatter
dateFromString
:
dateString
];
NSDate
*
expiryDate
=
[
formatter
dateFromString
:
dateString
];
...
@@ -66,7 +72,6 @@ static ICUserManager * manager;
...
@@ -66,7 +72,6 @@ static ICUserManager * manager;
// else if ([expiryDate timeIntervalSinceDate:[NSDate date]] <= 0) {
// else if ([expiryDate timeIntervalSinceDate:[NSDate date]] <= 0) {
// return false;
// return false;
// }
// }
return
self
.
model
.
isMember
;
return
self
.
model
.
isMember
;
}
}
...
@@ -162,7 +167,11 @@ static ICUserManager * manager;
...
@@ -162,7 +167,11 @@ static ICUserManager * manager;
}
else
{
}
else
{
[
data
removeDicForKey
:
@"urlInfo"
];
[
data
removeDicForKey
:
@"urlInfo"
];
}
}
if
([[[
response
objectForKey
:
@"result"
]
objectForKey
:
@"data"
]
objectForKey
:
@"config"
])
{
[
data
WirteDic
:[[[
response
objectForKey
:
@"result"
]
objectForKey
:
@"data"
]
objectForKey
:
@"config"
]
Key
:
@"config"
];
}
else
{
[
data
removeDicForKey
:
@"config"
];
}
}
}
}
failure
:^
(
NSError
*
_Nonnull
error
)
{
}
failure
:^
(
NSError
*
_Nonnull
error
)
{
...
...
superCleaner/Manager/Network/ICPurchaseManager.swift
View file @
8dfbba44
...
@@ -24,7 +24,7 @@ class ICPurchaseManager: NSObject {
...
@@ -24,7 +24,7 @@ class ICPurchaseManager: NSObject {
case
.
success
(
let
product
):
case
.
success
(
let
product
):
print
(
"Purchase Success:
\(
product
.
productId
)
"
)
print
(
"Purchase Success:
\(
product
.
productId
)
"
)
let
appleValidator
=
AppleReceiptValidator
(
service
:
.
production
,
sharedSecret
:
"
0dee7332e952467c97e5d4ecd1f788f6
"
)
let
appleValidator
=
AppleReceiptValidator
(
service
:
.
production
,
sharedSecret
:
"
ed0f68aca7964038a5cdf2a68c8c35c4
"
)
let
hud
=
MBProgressHUD
.
showAdded
(
to
:
inView
,
animated
:
true
)
let
hud
=
MBProgressHUD
.
showAdded
(
to
:
inView
,
animated
:
true
)
SwiftyStoreKit
.
verifyReceipt
(
using
:
appleValidator
)
{
result
in
SwiftyStoreKit
.
verifyReceipt
(
using
:
appleValidator
)
{
result
in
hud
.
hide
(
animated
:
true
)
hud
.
hide
(
animated
:
true
)
...
@@ -230,7 +230,7 @@ class ICPurchaseManager: NSObject {
...
@@ -230,7 +230,7 @@ class ICPurchaseManager: NSObject {
print
(
"Restore sortedResults:
\(
sortedResults
)
"
)
print
(
"Restore sortedResults:
\(
sortedResults
)
"
)
if
let
purchase
=
sortedResults
.
last
{
if
let
purchase
=
sortedResults
.
last
{
let
appleValidator
=
AppleReceiptValidator
(
service
:
.
production
,
sharedSecret
:
"
0dee7332e952467c97e5d4ecd1f788f6
"
)
let
appleValidator
=
AppleReceiptValidator
(
service
:
.
production
,
sharedSecret
:
"
ed0f68aca7964038a5cdf2a68c8c35c4
"
)
let
hud
=
MBProgressHUD
.
showAdded
(
to
:
UIApplication
.
shared
.
delegate
!.
window
!!
,
animated
:
true
)
let
hud
=
MBProgressHUD
.
showAdded
(
to
:
UIApplication
.
shared
.
delegate
!.
window
!!
,
animated
:
true
)
SwiftyStoreKit
.
verifyReceipt
(
using
:
appleValidator
)
{
result
in
SwiftyStoreKit
.
verifyReceipt
(
using
:
appleValidator
)
{
result
in
hud
.
hide
(
animated
:
true
)
hud
.
hide
(
animated
:
true
)
...
...
superCleaner/Other/ICNetworkSpeedViewController.m
View file @
8dfbba44
...
@@ -86,7 +86,7 @@
...
@@ -86,7 +86,7 @@
-
(
void
)
pingActionFired
{
-
(
void
)
pingActionFired
{
self
.
pingServices
=
[
STDPingServices
startPingAddress
:
@"
117.78.49.136
"
monitorTime
:
5
callbackHandler
:^
(
STDPingItem
*
pingItem
,
NSArray
*
pingItems
)
{
self
.
pingServices
=
[
STDPingServices
startPingAddress
:
@"
https://www.baidu.com
"
monitorTime
:
5
callbackHandler
:^
(
STDPingItem
*
pingItem
,
NSArray
*
pingItems
)
{
if
(
pingItem
.
status
!=
STDPingStatusFinished
)
{
if
(
pingItem
.
status
!=
STDPingStatusFinished
)
{
NSLog
(
@"-----%@"
,
pingItem
.
description
);
NSLog
(
@"-----%@"
,
pingItem
.
description
);
}
else
{
}
else
{
...
...
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