Commit 46bd273a authored by CZ1004's avatar CZ1004

Merge branch 'Advertisement' of…

Merge branch 'Advertisement' of http://gitlab.zhangxindiet.com/ShuMing/phonemanager into Advertisement

* 'Advertisement' of http://gitlab.zhangxindiet.com/ShuMing/phonemanager:
  1.启动页修改  2.适配修改
parents 6c0fc9fc 48ab844b
......@@ -10,6 +10,7 @@
0496DEF32D9E3F58005B2834 /* WidgetKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 04BD915D2D9D68AD00055CEB /* WidgetKit.framework */; };
0496DEF42D9E3F58005B2834 /* SwiftUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 04BD915F2D9D68AD00055CEB /* SwiftUI.framework */; };
0496DEFF2D9E3F59005B2834 /* widgetExtension.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = 0496DEF22D9E3F57005B2834 /* widgetExtension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
04BBB4E62DC0748F00D7E3AB /* StoreKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 04BBB4E52DC0748F00D7E3AB /* StoreKit.framework */; };
04CF31702DA7E78F001C87CA /* Intents.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 04BD7A442DA3BA1700A24C4B /* Intents.framework */; };
04CF31772DA7E790001C87CA /* ChargeShow.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = 04CF316F2DA7E78F001C87CA /* ChargeShow.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
04CF317D2DA7E7BE001C87CA /* Intents.intentdefinition in Sources */ = {isa = PBXBuildFile; fileRef = 04CF317C2DA7E7BE001C87CA /* Intents.intentdefinition */; };
......@@ -62,6 +63,7 @@
/* Begin PBXFileReference section */
0496DEF22D9E3F57005B2834 /* widgetExtension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = widgetExtension.appex; sourceTree = BUILT_PRODUCTS_DIR; };
0496DF042D9E3FA7005B2834 /* widgetExtension.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = widgetExtension.entitlements; sourceTree = "<group>"; };
04BBB4E52DC0748F00D7E3AB /* StoreKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = StoreKit.framework; path = System/Library/Frameworks/StoreKit.framework; sourceTree = SDKROOT; };
04BD7A442DA3BA1700A24C4B /* Intents.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Intents.framework; path = System/Library/Frameworks/Intents.framework; sourceTree = SDKROOT; };
04BD7A4F2DA3BA1700A24C4B /* IntentsUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IntentsUI.framework; path = System/Library/Frameworks/IntentsUI.framework; sourceTree = SDKROOT; };
04BD915D2D9D68AD00055CEB /* WidgetKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WidgetKit.framework; path = System/Library/Frameworks/WidgetKit.framework; sourceTree = SDKROOT; };
......@@ -148,6 +150,7 @@
buildActionMask = 2147483647;
files = (
3A00E856852A8783E544CD7D /* Pods_PhoneManager.framework in Frameworks */,
04BBB4E62DC0748F00D7E3AB /* StoreKit.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
......@@ -157,6 +160,7 @@
27ECDADD9059AB5043B8E1E9 /* Frameworks */ = {
isa = PBXGroup;
children = (
04BBB4E52DC0748F00D7E3AB /* StoreKit.framework */,
6028F60B696E2F97EAA2325C /* Pods_PhoneManager.framework */,
04BD915D2D9D68AD00055CEB /* WidgetKit.framework */,
04BD915F2D9D68AD00055CEB /* SwiftUI.framework */,
......
......@@ -5,12 +5,12 @@
"scale" : "1x"
},
{
"filename" : "huadong@2x.png",
"filename" : "pinglun@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "huadong@3x.png",
"filename" : "pinglun@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
......
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "logo_phone_manager@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "logo_phone_manager@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "phone_manager@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "phone_manager@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{"nm":"Comp 1","ddd":0,"h":256,"w":256,"meta":{"g":"@lottiefiles/toolkit-js 0.33.2"},"layers":[{"ty":4,"nm":"Shape Layer 3","sr":1,"st":0,"op":300.00001221925,"ip":0,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":0,"k":[-70,-0.5,0]},"s":{"a":0,"k":[75,75,100]},"sk":{"a":0,"k":0},"p":{"a":1,"k":[{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[208.6,127.969,0],"t":20,"ti":[0,-0.00520833348855,0],"to":[0,-6.66145849227905,0]},{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[208.6,88,0],"t":30,"ti":[0,-6.66666650772095,0],"to":[0,0.00520833348855,0]},{"s":[208.6,128,0],"t":40.0000016292334}]},"r":{"a":0,"k":0},"sa":{"a":0,"k":0},"o":{"a":0,"k":100}},"ef":[],"shapes":[{"ty":"gr","bm":0,"hd":false,"mn":"ADBE Vector Group","nm":"Ellipse 1","ix":1,"cix":2,"np":3,"it":[{"ty":"el","bm":0,"hd":false,"mn":"ADBE Vector Shape - Ellipse","nm":"Ellipse Path 1","d":1,"p":{"a":0,"k":[0,0]},"s":{"a":0,"k":[33.75,34.5]}},{"ty":"fl","bm":0,"hd":false,"mn":"ADBE Vector Graphic - Fill","nm":"Fill 1","c":{"a":0,"k":[1,1,1]},"r":1,"o":{"a":0,"k":100}},{"ty":"tr","a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"sk":{"a":0,"k":0,"ix":4},"p":{"a":0,"k":[-70.125,-0.5],"ix":2},"r":{"a":0,"k":0,"ix":6},"sa":{"a":0,"k":0,"ix":5},"o":{"a":0,"k":100,"ix":7}}]}],"ind":1},{"ty":4,"nm":"Shape Layer 2","sr":1,"st":0,"op":300.00001221925,"ip":0,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":0,"k":[-70,-0.5,0]},"s":{"a":0,"k":[75,75,100]},"sk":{"a":0,"k":0},"p":{"a":1,"k":[{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[168.6,128,0],"t":15,"ti":[0,0,0],"to":[0,-6.66666650772095,0]},{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[168.6,88,0],"t":25,"ti":[0,-6.66666650772095,0],"to":[0,0,0]},{"s":[168.6,128,0],"t":35.0000014255792}]},"r":{"a":0,"k":0},"sa":{"a":0,"k":0},"o":{"a":0,"k":100}},"ef":[],"shapes":[{"ty":"gr","bm":0,"hd":false,"mn":"ADBE Vector Group","nm":"Ellipse 1","ix":1,"cix":2,"np":3,"it":[{"ty":"el","bm":0,"hd":false,"mn":"ADBE Vector Shape - Ellipse","nm":"Ellipse Path 1","d":1,"p":{"a":0,"k":[0,0]},"s":{"a":0,"k":[33.75,34.5]}},{"ty":"fl","bm":0,"hd":false,"mn":"ADBE Vector Graphic - Fill","nm":"Fill 1","c":{"a":0,"k":[1,1,1]},"r":1,"o":{"a":0,"k":100}},{"ty":"tr","a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"sk":{"a":0,"k":0,"ix":4},"p":{"a":0,"k":[-70.125,-0.5],"ix":2},"r":{"a":0,"k":0,"ix":6},"sa":{"a":0,"k":0,"ix":5},"o":{"a":0,"k":100,"ix":7}}]}],"ind":2},{"ty":4,"nm":"Shape Layer 1","sr":1,"st":0,"op":300.00001221925,"ip":0,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":0,"k":[-70,-0.5,0]},"s":{"a":0,"k":[75,75,100]},"sk":{"a":0,"k":0},"p":{"a":1,"k":[{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[128.594,127.969,0],"t":10,"ti":[0,-0.00520833348855,0],"to":[0,-6.66145849227905,0]},{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[128.594,88,0],"t":20,"ti":[0,-6.66666650772095,0],"to":[0,0.00520833348855,0]},{"s":[128.594,128,0],"t":30.0000012219251}]},"r":{"a":0,"k":0},"sa":{"a":0,"k":0},"o":{"a":0,"k":100}},"ef":[],"shapes":[{"ty":"gr","bm":0,"hd":false,"mn":"ADBE Vector Group","nm":"Ellipse 1","ix":1,"cix":2,"np":3,"it":[{"ty":"el","bm":0,"hd":false,"mn":"ADBE Vector Shape - Ellipse","nm":"Ellipse Path 1","d":1,"p":{"a":0,"k":[0,0]},"s":{"a":0,"k":[33.75,34.5]}},{"ty":"fl","bm":0,"hd":false,"mn":"ADBE Vector Graphic - Fill","nm":"Fill 1","c":{"a":0,"k":[1,1,1]},"r":1,"o":{"a":0,"k":100}},{"ty":"tr","a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"sk":{"a":0,"k":0,"ix":4},"p":{"a":0,"k":[-70.125,-0.5],"ix":2},"r":{"a":0,"k":0,"ix":6},"sa":{"a":0,"k":0,"ix":5},"o":{"a":0,"k":100,"ix":7}}]}],"ind":3},{"ty":4,"nm":"Shape Layer 4","sr":1,"st":0,"op":300.00001221925,"ip":0,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":0,"k":[-70,-0.5,0]},"s":{"a":0,"k":[75,75,100]},"sk":{"a":0,"k":0},"p":{"a":1,"k":[{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[88.6,127.969,0],"t":5,"ti":[0,-0.00520833348855,0],"to":[0,-6.66145849227905,0]},{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[88.6,88,0],"t":15,"ti":[0,-6.66666650772095,0],"to":[0,0.00520833348855,0]},{"s":[88.6,128,0],"t":25.0000010182709}]},"r":{"a":0,"k":0},"sa":{"a":0,"k":0},"o":{"a":0,"k":100}},"ef":[],"shapes":[{"ty":"gr","bm":0,"hd":false,"mn":"ADBE Vector Group","nm":"Ellipse 1","ix":1,"cix":2,"np":3,"it":[{"ty":"el","bm":0,"hd":false,"mn":"ADBE Vector Shape - Ellipse","nm":"Ellipse Path 1","d":1,"p":{"a":0,"k":[0,0]},"s":{"a":0,"k":[33.75,34.5]}},{"ty":"fl","bm":0,"hd":false,"mn":"ADBE Vector Graphic - Fill","nm":"Fill 1","c":{"a":0,"k":[1,1,1]},"r":1,"o":{"a":0,"k":100}},{"ty":"tr","a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"sk":{"a":0,"k":0,"ix":4},"p":{"a":0,"k":[-70.125,-0.5],"ix":2},"r":{"a":0,"k":0,"ix":6},"sa":{"a":0,"k":0,"ix":5},"o":{"a":0,"k":100,"ix":7}}]}],"ind":4},{"ty":4,"nm":"Shape Layer 5","sr":1,"st":0,"op":300.00001221925,"ip":0,"hd":false,"ddd":0,"bm":0,"hasMask":false,"ao":0,"ks":{"a":{"a":0,"k":[-70,-0.5,0]},"s":{"a":0,"k":[75,75,100]},"sk":{"a":0,"k":0},"p":{"a":1,"k":[{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[48.6,127.969,0],"t":0,"ti":[0,-0.00520833348855,0],"to":[0,-6.66145849227905,0]},{"o":{"x":0.333,"y":0},"i":{"x":0.667,"y":1},"s":[48.6,88,0],"t":10,"ti":[0,-6.66666650772095,0],"to":[0,0.00520833348855,0]},{"s":[48.6,128,0],"t":20.0000008146167}]},"r":{"a":0,"k":0},"sa":{"a":0,"k":0},"o":{"a":0,"k":100}},"ef":[],"shapes":[{"ty":"gr","bm":0,"hd":false,"mn":"ADBE Vector Group","nm":"Ellipse 1","ix":1,"cix":2,"np":3,"it":[{"ty":"el","bm":0,"hd":false,"mn":"ADBE Vector Shape - Ellipse","nm":"Ellipse Path 1","d":1,"p":{"a":0,"k":[0,0]},"s":{"a":0,"k":[33.75,34.5]}},{"ty":"fl","bm":0,"hd":false,"mn":"ADBE Vector Graphic - Fill","nm":"Fill 1","c":{"a":0,"k":[1,1,1]},"r":1,"o":{"a":0,"k":100}},{"ty":"tr","a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"sk":{"a":0,"k":0,"ix":4},"p":{"a":0,"k":[-70.125,-0.5],"ix":2},"r":{"a":0,"k":0,"ix":6},"sa":{"a":0,"k":0,"ix":5},"o":{"a":0,"k":100,"ix":7}}]}],"ind":5}],"v":"4.6.8","fr":29.9700012207031,"op":40.0000016292334,"ip":0,"assets":[]}
\ No newline at end of file
......@@ -303,26 +303,23 @@ class CompressCompletedViewController : BaseViewController{
let fetchResult = PHAsset.fetchAssets(withLocalIdentifiers: idents, options: nil)
let fileSize = FileTool().calculateTotalAssetSize(fetchResult: fetchResult)
let assetToDelete = fetchResult.firstObject
PMLoadingHUD.share.show()
// PMLoadingHUD.share.show()
PHPhotoLibrary.shared().performChanges ({
PHAssetChangeRequest.deleteAssets([assetToDelete] as NSFastEnumeration)
}){ success, error in
if(success){
DispatchQueue.main.asyncAfter(deadline: .now() + 1.0) {
PMLoadingHUD.share.disMiss()
var models :[AssetModel] = []
var count = 0
for ele in self.model! {
count = count + 1
self.updateCompressData(flag: ele.ident)
let deleteModel = AssetModel(localIdentifier: ele.ident, assetSize: ele.orgSize, createDate: ele.createDate)
models.append(deleteModel)
}
PhotoDataManager.manager.removeDataWhenDeleteInPage(data: models)
print("删除文件成功")
self.showDeleteSuccess(fileCount:count, fileSize: fileSize)
self.jumpToCompressVC()
var models :[AssetModel] = []
var count = 0
for ele in self.model! {
count = count + 1
self.updateCompressData(flag: ele.ident)
let deleteModel = AssetModel(localIdentifier: ele.ident, assetSize: ele.orgSize, createDate: ele.createDate)
models.append(deleteModel)
}
PhotoDataManager.manager.removeDataWhenDeleteInPage(data: models)
print("删除文件成功")
self.showDeleteSuccess(fileCount:count, fileSize: fileSize)
// self.jumpToCompressVC()
}else {
PMLoadingHUD.share.disMiss()
if let error = error {
......@@ -335,6 +332,7 @@ class CompressCompletedViewController : BaseViewController{
// 删除成功页面
func showDeleteSuccess(fileCount:Int,fileSize:Int64){
DispatchQueue.main.async {
self.jumpToCompressVC()
let vc = DelSuccessViewController()
vc.delType = fileCount > 1 ? "photos" : "photo"
vc.fileSzie = fileSize
......
......@@ -256,8 +256,10 @@ class HomePhotosDetailViewController : BaseViewController {
let options = PHImageRequestOptions()
options.isNetworkAccessAllowed = true
options.isSynchronous = false
PHImageManager.default().requestImage(for: assetsArray.first!, targetSize: CGSize(width: 200, height: 200), contentMode: .aspectFill, options: options) { (image, info) in
completed(image ?? UIImage())
if let first = assetsArray.first{
PHImageManager.default().requestImage(for: first, targetSize: CGSize(width: 200, height: 200), contentMode: .aspectFill, options: options) { (image, info) in
completed(image ?? UIImage())
}
}
}
}
......
......@@ -12,41 +12,41 @@
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" id="gTV-IL-0wX" customClass="NewGuideOneCell" customModule="PhoneManager" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="383" height="642"/>
<rect key="frame" x="0.0" y="0.0" width="403" height="731"/>
<autoresizingMask key="autoresizingMask"/>
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
<rect key="frame" x="0.0" y="0.0" width="383" height="642"/>
<rect key="frame" x="0.0" y="0.0" width="403" height="731"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Welcome to use" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="9sQ-uI-GSY">
<rect key="frame" x="101.66666666666669" y="36" width="180" height="30"/>
<rect key="frame" x="111.66666666666669" y="36" width="180" height="30"/>
<fontDescription key="fontDescription" type="system" weight="semibold" pointSize="25"/>
<color key="textColor" red="0.082352941176470587" green="0.082352941176470587" blue="0.082352941176470587" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Phone Manager" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="EVM-dM-Bi7">
<rect key="frame" x="77.666666666666686" y="67" width="228" height="39"/>
<rect key="frame" x="87.666666666666686" y="67" width="228" height="39"/>
<fontDescription key="fontDescription" type="system" weight="semibold" pointSize="32"/>
<color key="textColor" red="0.08235294118" green="0.08235294118" blue="0.08235294118" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Over 1000+ users worldwide" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Txd-ub-V2M">
<rect key="frame" x="42.666666666666657" y="166" width="298" height="29"/>
<rect key="frame" x="52.666666666666657" y="166" width="298" height="29"/>
<fontDescription key="fontDescription" type="system" pointSize="24"/>
<color key="textColor" red="0.08235294118" green="0.08235294118" blue="0.08235294118" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Selected 'Phone manager'" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Ofu-Vm-8RJ">
<rect key="frame" x="81" y="203" width="221" height="21.666666666666657"/>
<rect key="frame" x="91" y="203" width="221" height="21.666666666666657"/>
<fontDescription key="fontDescription" type="system" weight="semibold" pointSize="18"/>
<color key="textColor" red="0.08235294118" green="0.08235294118" blue="0.08235294118" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_guide_ye" translatesAutoresizingMaskIntoConstraints="NO" id="qJm-ym-n7r">
<rect key="frame" x="27" y="312.66666666666669" width="159" height="45"/>
<rect key="frame" x="37" y="312.66666666666669" width="159" height="45"/>
</imageView>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Dp0-fO-xVX">
<rect key="frame" x="191" y="330.33333333333331" width="1" height="10"/>
<rect key="frame" x="201" y="330.33333333333331" width="1" height="10"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstAttribute="height" constant="10" id="iOh-nB-kgO"/>
......@@ -54,36 +54,36 @@
</constraints>
</view>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_guide_ye" translatesAutoresizingMaskIntoConstraints="NO" id="tPc-eM-ini">
<rect key="frame" x="197" y="312.66666666666669" width="159" height="45"/>
<rect key="frame" x="207" y="312.66666666666669" width="159" height="45"/>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="50,000+" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Gkr-xl-yIC">
<rect key="frame" x="231" y="316.66666666666669" width="91" height="27"/>
<rect key="frame" x="241" y="316.66666666666669" width="91" height="27"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="22"/>
<color key="textColor" red="0.08235294118" green="0.08235294118" blue="0.08235294118" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Clean up photos" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="BBI-So-OYY">
<rect key="frame" x="232.66666666666666" y="343.66666666666669" width="87.666666666666657" height="13.333333333333314"/>
<rect key="frame" x="242.66666666666666" y="343.66666666666669" width="87.666666666666657" height="13.333333333333314"/>
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="11"/>
<color key="textColor" red="0.08235294118" green="0.08235294118" blue="0.08235294118" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="1,000+" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="btU-j2-5y8">
<rect key="frame" x="69.666666666666671" y="316.66666666666669" width="74.000000000000014" height="27"/>
<rect key="frame" x="79.666666666666671" y="316.66666666666669" width="74.000000000000014" height="27"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="22"/>
<color key="textColor" red="0.08235294118" green="0.08235294118" blue="0.08235294118" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="User" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Nyn-Jp-1go">
<rect key="frame" x="94" y="343.66666666666669" width="25.333333333333329" height="13.333333333333314"/>
<rect key="frame" x="104" y="343.66666666666669" width="25.333333333333343" height="13.333333333333314"/>
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="11"/>
<color key="textColor" red="0.08235294118" green="0.08235294118" blue="0.08235294118" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_guide_huadong" translatesAutoresizingMaskIntoConstraints="NO" id="dtg-ck-CGz">
<rect key="frame" x="8" y="392.66666666666669" width="375" height="144.00000000000006"/>
<rect key="frame" x="28" y="392.66666666666669" width="375" height="214.00000000000006"/>
<constraints>
<constraint firstAttribute="height" constant="144" id="7cs-70-ugl" customClass="ScreenWidthRatioConstraint" customModule="PhoneManager" customModuleProvider="target"/>
<constraint firstAttribute="height" constant="214" id="OqW-5R-Kz3" customClass="ScreenWidthRatioConstraint" customModule="PhoneManager" customModuleProvider="target"/>
<constraint firstAttribute="width" constant="375" id="WrQ-JG-AK0" customClass="ScreenWidthRatioConstraint" customModule="PhoneManager" customModuleProvider="target"/>
</constraints>
</imageView>
......@@ -118,16 +118,16 @@
<constraint firstItem="Nyn-Jp-1go" firstAttribute="centerX" secondItem="btU-j2-5y8" secondAttribute="centerX" id="y6x-9h-nNx"/>
<constraint firstItem="Gkr-xl-yIC" firstAttribute="top" secondItem="tPc-eM-ini" secondAttribute="top" constant="4" id="ynQ-0m-XQB"/>
</constraints>
<size key="customSize" width="358" height="642"/>
<size key="customSize" width="378" height="731"/>
<connections>
<outlet property="htitle" destination="Ofu-Vm-8RJ" id="YM4-rh-Ra7"/>
<outlet property="subtitle" destination="Txd-ub-V2M" id="gKq-qF-heh"/>
</connections>
<point key="canvasLocation" x="370.2290076335878" y="228.16901408450704"/>
<point key="canvasLocation" x="385.49618320610688" y="259.50704225352115"/>
</collectionViewCell>
</objects>
<resources>
<image name="icon_guide_huadong" width="375" height="144"/>
<image name="icon_guide_huadong" width="363" height="214"/>
<image name="icon_guide_ye" width="159" height="45"/>
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
......
......@@ -18,6 +18,28 @@
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="In6-Ib-vMq">
<rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_phone_manager" translatesAutoresizingMaskIntoConstraints="NO" id="cFS-b7-ypd">
<rect key="frame" x="140.66666666666666" y="150" width="112" height="149"/>
<constraints>
<constraint firstAttribute="height" constant="149" id="AfZ-RA-Eaa" customClass="ScreenHeightRatioConstraint" customModule="PhoneManager" customModuleProvider="target"/>
<constraint firstAttribute="width" constant="112" id="bFG-b6-5oP" customClass="ScreenHeightRatioConstraint" customModule="PhoneManager" customModuleProvider="target"/>
</constraints>
</imageView>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_phone_manager_name" translatesAutoresizingMaskIntoConstraints="NO" id="Gdz-im-Bhj">
<rect key="frame" x="119" y="311" width="155" height="33"/>
<constraints>
<constraint firstAttribute="height" constant="33" id="Qfk-ck-Fmz" customClass="ScreenHeightRatioConstraint" customModule="PhoneManager" customModuleProvider="target"/>
<constraint firstAttribute="width" constant="155" id="di1-2b-Z88" customClass="ScreenHeightRatioConstraint" customModule="PhoneManager" customModuleProvider="target"/>
</constraints>
</imageView>
</subviews>
<constraints>
<constraint firstItem="cFS-b7-ypd" firstAttribute="top" secondItem="In6-Ib-vMq" secondAttribute="top" constant="150" id="IrO-g6-x2b" customClass="ScreenHeightRatioConstraint" customModule="PhoneManager" customModuleProvider="target"/>
<constraint firstItem="Gdz-im-Bhj" firstAttribute="top" secondItem="cFS-b7-ypd" secondAttribute="bottom" constant="12" id="QYI-3b-Ege"/>
<constraint firstItem="cFS-b7-ypd" firstAttribute="centerX" secondItem="In6-Ib-vMq" secondAttribute="centerX" id="aZP-mB-lQn"/>
<constraint firstItem="Gdz-im-Bhj" firstAttribute="centerX" secondItem="In6-Ib-vMq" secondAttribute="centerX" id="wor-yU-GhE"/>
</constraints>
</view>
</subviews>
<viewLayoutGuide key="safeArea" id="vDu-zF-Fre"/>
......@@ -38,4 +60,8 @@
<point key="canvasLocation" x="54.198473282442748" y="-34.507042253521128"/>
</scene>
</scenes>
<resources>
<image name="icon_phone_manager" width="112" height="149"/>
<image name="icon_phone_manager_name" width="155" height="33"/>
</resources>
</document>
......@@ -12,15 +12,15 @@ class LauchVC:UIViewController {
@IBOutlet weak var backView: UIView!
private lazy var LaunchingView:LottieAnimationView = {
let animationView = LottieAnimationView(name: "AppLauncher")
animationView.loopMode = .playOnce
animationView.play()
return animationView
}()
// private lazy var LaunchingView:LottieAnimationView = {
// let animationView = LottieAnimationView(name: "AppLauncher")
// animationView.loopMode = .playOnce
// animationView.play()
// return animationView
// }()
private lazy var LaunchingLoop: LottieAnimationView = {
let animationView = LottieAnimationView(name: "Loading_white")
let animationView = LottieAnimationView(name: "launch_loaing")
animationView.loopMode = .loop
animationView.play()
return animationView
......@@ -29,17 +29,17 @@ class LauchVC:UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
backView.addSubview(LaunchingView)
// backView.addSubview(LaunchingView)
backView.addSubview(LaunchingLoop)
LaunchingView.snp.makeConstraints { make in
make.centerX.equalToSuperview()
make.centerY.equalToSuperview().offset(-140 * RScreenH())
make.width.equalToSuperview()
make.height.equalTo(LaunchingView.snp.width)
}
// LaunchingView.snp.makeConstraints { make in
// make.centerX.equalToSuperview()
// make.centerY.equalToSuperview().offset(-140 * RScreenH())
// make.width.equalToSuperview()
// make.height.equalTo(LaunchingView.snp.width)
// }
LaunchingLoop.snp.makeConstraints { make in
make.centerX.equalToSuperview()
make.width.height.equalTo(200)
make.width.height.equalTo(150)
make.bottom.equalToSuperview().offset(-60 * RScreenH())
}
DispatchQueue.main.asyncAfter(deadline: .now() + 3, execute: {
......
......@@ -12,12 +12,11 @@ class HomePayDueView: UIView {
@IBOutlet weak var dueDay: UILabel!
@IBOutlet weak var dueTime: UILabel!
@IBOutlet weak var freeTime: UILabel!
@IBOutlet weak var priceL: UILabel!
@IBOutlet weak var saveL: UILabel!
@IBOutlet weak var freePrice: UILabel!
override func awakeFromNib() {
super.awakeFromNib()
......@@ -27,6 +26,19 @@ class HomePayDueView: UIView {
saveL.layer.cornerRadius = 8
saveL.layer.masksToBounds = true
dueDay.font = UIFont.scaledSystemFont(ofSize: 14, weight: .bold)
dueTime.font = UIFont.scaledSystemFont(ofSize: 12, weight: .regular)
priceL.font = UIFont.scaledSystemFont(ofSize: 12, weight: .regular)
freeTime.font = UIFont.scaledSystemFont(ofSize: 12, weight: .regular)
saveL.font = UIFont.scaledSystemFont(ofSize: 14, weight: .bold)
freePrice.font = UIFont.scaledSystemFont(ofSize: 12, weight: .regular)
}
func reloadUI(_ type:Int,product1:SKProduct?,product2:SKProduct?){
......@@ -41,7 +53,7 @@ class HomePayDueView: UIView {
saveL.isHidden = true
priceL.text = "\(pord.localizedPrice)"
priceL.font = UIFont.systemFont(ofSize: 12, weight: .regular)
priceL.font = UIFont.scaledSystemFont(ofSize: 12, weight: .regular)
dueTime.text = "Due" + getDateSevenDaysLater()
......@@ -55,7 +67,7 @@ class HomePayDueView: UIView {
saveL.isHidden = false
priceL.text = "\(pord1.localizedPrice)"
priceL.font = UIFont.systemFont(ofSize: 14, weight: .regular)
priceL.font = UIFont.scaledSystemFont(ofSize: 14, weight: .regular)
}
}
......
......@@ -52,8 +52,8 @@
<rect key="frame" x="272" y="29.666666666666671" width="85" height="21"/>
<color key="backgroundColor" red="0.32156862745098036" green="0.7803921568627451" blue="0.46274509803921571" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="width" constant="85" id="6LD-4Y-C7t"/>
<constraint firstAttribute="height" constant="21" id="YL8-Mf-YdS"/>
<constraint firstAttribute="width" constant="85" id="6LD-4Y-C7t" customClass="ScreenWidthRatioConstraint" customModule="PhoneManager" customModuleProvider="target"/>
<constraint firstAttribute="height" constant="21" id="YL8-Mf-YdS" customClass="ScreenWidthRatioConstraint" customModule="PhoneManager" customModuleProvider="target"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="12"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
......@@ -63,8 +63,8 @@
<rect key="frame" x="311" y="29.666666666666671" width="85" height="21"/>
<color key="backgroundColor" red="0.32156862749999998" green="0.78039215689999997" blue="0.46274509800000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="21" id="HGB-v2-yhW"/>
<constraint firstAttribute="width" constant="85" id="eSe-ik-cPa"/>
<constraint firstAttribute="height" constant="21" id="HGB-v2-yhW" customClass="ScreenWidthRatioConstraint" customModule="PhoneManager" customModuleProvider="target"/>
<constraint firstAttribute="width" constant="85" id="eSe-ik-cPa" customClass="ScreenWidthRatioConstraint" customModule="PhoneManager" customModuleProvider="target"/>
</constraints>
<fontDescription key="fontDescription" type="boldSystem" pointSize="14"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
......
......@@ -52,7 +52,7 @@ class HomePayView:UIView {
lazy var ppBtn:UIButton = {
let sview:UIButton = UIButton()
let content:String = "Terms"
let font = UIFont.systemFont(ofSize: 12.RW(), weight: .medium)
let font = UIFont.scaledSystemFont(ofSize: 12, weight: .medium)
let color = UIColor.colorWithHex(hexStr: black6Color)
sview.setTitle(content, for: .normal)
sview.setTitleColor(color, for: .normal)
......@@ -76,7 +76,7 @@ class HomePayView:UIView {
let sview:UIButton = UIButton()
let content:String = "Restore"
let font = UIFont.systemFont(ofSize: 12.RW(), weight: .medium)
let font = UIFont.scaledSystemFont(ofSize: 12, weight: .medium)
let color = UIColor.colorWithHex(hexStr: black6Color)
sview.setTitle(content, for: .normal)
......@@ -138,12 +138,12 @@ class HomePayView:UIView {
titleLabel1 = UILabel()
titleLabel1?.text = "Clean your Storage"
titleLabel1?.font = UIFont.systemFont(ofSize: 24, weight: .bold)
titleLabel1?.font = UIFont.scaledSystemFont(ofSize: 24.RW(), weight: .bold)
titleLabel1?.textColor = UIColor.colorWithHex(hexStr: black3Color)
self.addSubview(titleLabel1!)
titleLabel1?.snp.makeConstraints { make in
make.top.equalToSuperview().offset(statusBarHeight + (ScreenH <= 667 ? 35 : 68.RH()))
make.top.equalToSuperview().offset(statusBarHeight + (68.RH()))
make.centerX.equalToSuperview()
}
......@@ -151,7 +151,7 @@ class HomePayView:UIView {
titleLabel2 = UILabel()
titleLabel2?.text = "Get rid of what you don't need"
titleLabel2?.font = UIFont.systemFont(ofSize: 14, weight: .regular)
titleLabel2?.font = UIFont.scaledSystemFont(ofSize: 14.RW(), weight: .regular)
titleLabel2?.textColor = UIColor.colorWithHex(hexStr: black3Color)
self.addSubview(titleLabel2!)
......@@ -168,7 +168,7 @@ class HomePayView:UIView {
photoImage.snp.makeConstraints { make in
make.top.equalTo(titleLabel2!.snp.bottom).offset(38.RH())
make.left.equalTo(48.RW())
make.size.equalTo(64)
make.size.equalTo(64.RW())
}
icloudImage = UIImageView(image: UIImage(named: "img_file_guide"))
......@@ -177,23 +177,23 @@ class HomePayView:UIView {
icloudImage.snp.makeConstraints { make in
make.left.equalTo(photoImage.snp.right).offset(24.RW())
make.centerY.equalTo(photoImage)
make.size.equalTo(64)
make.size.equalTo(64.RW())
}
photoLabel = UILabel()
photoLabel?.text = "403"
photoLabel?.backgroundColor = UIColor.colorWithHex(hexStr: "#EB4545")
photoLabel?.font = UIFont.systemFont(ofSize: 10, weight: .bold)
photoLabel?.font = UIFont.scaledSystemFont(ofSize: 10, weight: .bold)
photoLabel?.textAlignment = .center
photoLabel?.textColor = .white
photoLabel?.layer.cornerRadius = 12
photoLabel?.layer.cornerRadius = 12.RW()
photoLabel?.layer.masksToBounds = true
self.addSubview(photoLabel!)
photoLabel?.snp.makeConstraints { make in
make.top.equalTo(photoImage.snp.top).offset(-12)
make.right.equalTo(photoImage.snp.right).offset(12)
make.size.equalTo(24)
make.size.equalTo(24.RW())
}
photoLabel?.sizeToFit()
......@@ -201,17 +201,17 @@ class HomePayView:UIView {
icloudLabel = UILabel()
icloudLabel?.text = "217"
icloudLabel?.textAlignment = .center
icloudLabel?.font = UIFont.systemFont(ofSize: 10, weight: .bold)
icloudLabel?.font = UIFont.scaledSystemFont(ofSize: 10, weight: .bold)
icloudLabel?.backgroundColor = UIColor.colorWithHex(hexStr: "#EB4545")
icloudLabel?.textColor = .white
icloudLabel?.layer.cornerRadius = 12
icloudLabel?.layer.cornerRadius = 12.RW()
icloudLabel?.layer.masksToBounds = true
self.addSubview(icloudLabel!)
icloudLabel?.snp.makeConstraints { make in
make.top.equalTo(icloudImage.snp.top).offset(-12)
make.right.equalTo(icloudImage.snp.right).offset(12)
make.size.equalTo(24)
make.size.equalTo(24.RW())
}
icloudLabel?.sizeToFit()
......@@ -223,13 +223,13 @@ class HomePayView:UIView {
make.top.equalTo(icloudImage!.snp.bottom).offset(24)
make.centerX.equalToSuperview()
make.width.equalTo(280)
make.height.equalTo(12)
make.height.equalTo(12.RW())
}
let analysis = UILabel()
analysis.text = "Analysis completed"
analysis.textColor = UIColor.colorWithHex(hexStr: "#B3B3B3")
analysis.font = UIFont.systemFont(ofSize: 14, weight: .bold)
analysis.font = UIFont.scaledSystemFont(ofSize: 14, weight: .bold)
addSubview(analysis)
analysis.snp.makeConstraints { make in
make.left.equalTo(animationView.snp.left)
......@@ -239,7 +239,7 @@ class HomePayView:UIView {
memSize = UILabel()
memSize.text = "100%"
memSize.textColor = UIColor.colorWithHex(hexStr: "#B3B3B3")
memSize.font = UIFont.systemFont(ofSize: 14, weight: .bold)
memSize.font = UIFont.scaledSystemFont(ofSize: 14, weight: .bold)
addSubview(memSize)
memSize.snp.makeConstraints { make in
make.right.equalTo(animationView.snp.right)
......@@ -249,7 +249,7 @@ class HomePayView:UIView {
appleLabel = UILabel()
appleLabel?.text = " Secured with Apple"
appleLabel?.font = UIFont.systemFont(ofSize: 12, weight: .bold)
appleLabel?.font = UIFont.scaledSystemFont(ofSize: 12, weight: .bold)
appleLabel?.textColor = UIColor.colorWithHex(hexStr: black3Color)
self.addSubview(appleLabel!)
self.addSubview(ppBtn)
......@@ -257,13 +257,13 @@ class HomePayView:UIView {
payButton = UIButton()
payButton?.setTitle("Try Free", for: .normal)
payButton?.setTitleColor(UIColor.colorWithHex(hexStr: whiteColor), for: .normal)
payButton?.titleLabel?.font = UIFont.systemFont(ofSize: 16, weight: .bold)
payButton?.titleLabel?.font = UIFont.scaledSystemFont(ofSize: 16, weight: .bold)
payButton?.backgroundColor = UIColor.colorWithHex(hexStr: mColor)
payButton?.addTarget(self, action: #selector(payButtonClick), for: .touchUpInside)
self.addSubview(payButton!)
appleLabel?.snp.makeConstraints { make in
make.top.equalTo(payButton!.snp.bottom).offset(20)
make.top.equalToSuperview().offset(ScreenH - (20+kSafeAreaInsets.bottom))
make.centerX.equalToSuperview()
}
ppBtn.snp.makeConstraints { make in
......@@ -274,7 +274,7 @@ class HomePayView:UIView {
make.centerY.equalTo(appleLabel!)
make.right.equalToSuperview().offset(-marginLR)
}
payButton?.layer.cornerRadius = 32.5
payButton?.layer.cornerRadius = 32.RH()
payButton?.layer.masksToBounds = true
// 额外添加视图
......@@ -287,13 +287,13 @@ class HomePayView:UIView {
make.top.equalTo(tipsView.snp.bottom).offset(12)
make.centerX.equalToSuperview()
make.width.equalToSuperview().offset(-30)
make.height.equalTo(60)
make.height.equalTo(60.RH())
})
payButton?.snp.makeConstraints({ make in
make.centerX.equalToSuperview()
make.top.equalTo(payDueView.snp.bottom).offset(20)
make.bottom.equalTo(appleLabel!.snp.top).offset(-12.RH())
make.width.equalToSuperview().offset(-30)
make.height.equalTo(65)
make.height.equalTo(65.RH())
})
contentView2?.layer.cornerRadius = 12
contentView2?.layer.masksToBounds = true
......@@ -301,7 +301,7 @@ class HomePayView:UIView {
contentView2Title = UILabel()
contentView2Title?.text = "Free trial enabled"
contentView2Title?.font = UIFont.systemFont(ofSize: 16, weight: .bold)
contentView2Title?.font = UIFont.scaledSystemFont(ofSize: 16, weight: .bold)
contentView2Title?.textColor = UIColor.colorWithHex(hexStr: black3Color)
self.contentView2?.addSubview(contentView2Title!)
......@@ -352,7 +352,7 @@ class HomePayView:UIView {
lazy var privavye_Label: UILabel = {
let priva = UILabel()
priva.font = UIFont.systemFont(ofSize: 14)
priva.font = UIFont.scaledSystemFont(ofSize: 14, weight: .regular)
priva.textColor = .gray
priva.text = ""
priva.numberOfLines = 0
......@@ -390,6 +390,12 @@ class HomePayView:UIView {
self.product = product
self.product1 = product1
payDueView.reloadUI(type, product1: product, product2: product1)
trailTitle.attributedText = nil
if let pord = product{
trailTitle.text = "Free for 7 days, then \(pord.localizedPrice)/week"
}
}
private func setIsSelect() -> Void {
......@@ -422,9 +428,9 @@ class HomePayView:UIView {
let attribtit = NSMutableAttributedString(string:strs as String , attributes: [:])
if strs.length > 3 {
let rang = strs.range(of: "privacy policy")
attribtit.addAttributes([NSAttributedString.Key.font : UIFont.boldSystemFont(ofSize: 14),NSAttributedString.Key.underlineStyle:NSUnderlineStyle.single.rawValue,.link:"appscheme://private"], range: rang)
attribtit.addAttributes([NSAttributedString.Key.font : UIFont.scaledSystemFont(ofSize: 14, weight: .bold),NSAttributedString.Key.underlineStyle:NSUnderlineStyle.single.rawValue,.link:"appscheme://private"], range: rang)
let rang1 = strs.range(of: "terms of use")
attribtit.addAttributes([NSAttributedString.Key.font : UIFont.boldSystemFont(ofSize: 14),NSAttributedString.Key.underlineStyle:NSUnderlineStyle.single.rawValue,.link:"appscheme://terms"], range: rang1)
attribtit.addAttributes([NSAttributedString.Key.font : UIFont.scaledSystemFont(ofSize: 14, weight: .bold),NSAttributedString.Key.underlineStyle:NSUnderlineStyle.single.rawValue,.link:"appscheme://terms"], range: rang1)
}
privavye_Label.attributedText = attribtit
layoutIfNeeded()
......@@ -462,74 +468,75 @@ class HomePayView:UIView {
let tiptTitle = UILabel()
tiptTitle.text = "Phone Manager"
tiptTitle.textColor = UIColor.colorWithHex(hexStr: black3Color)
tiptTitle.font = UIFont.systemFont(ofSize: 16, weight: .bold)
tiptTitle.font = UIFont.scaledSystemFont(ofSize: 16, weight: .bold)
tipsView.addSubview(tiptTitle)
tiptTitle.snp.makeConstraints { make in
make.left.equalTo(16)
make.top.equalTo(16)
make.top.equalTo(16.RH())
}
let subTitle = UILabel()
subTitle.text = "Smart Cleaning, Video Compressor, Secret Storage, Manage Contacts, No Ads and Limits."
subTitle.textColor = UIColor.colorWithHex(hexStr: black6Color)
subTitle.numberOfLines = 2
subTitle.font = UIFont.systemFont(ofSize: 12, weight: .regular)
subTitle.font = UIFont.scaledSystemFont(ofSize: 12, weight: .regular)
tipsView.addSubview(subTitle)
subTitle.snp.makeConstraints { make in
make.left.equalTo(16)
make.right.equalTo(-16)
make.top.equalTo(tiptTitle.snp.bottom).offset(8)
make.top.equalTo(tiptTitle.snp.bottom).offset(8.RH())
}
trailTitle = UILabel()
trailTitle.text = "Free for 7 days, then $6.99/week"
trailTitle.textColor = UIColor.colorWithHex(hexStr: black3Color)
trailTitle.font = UIFont.systemFont(ofSize: 12, weight: .regular)
trailTitle.font = UIFont.scaledSystemFont(ofSize: 12, weight: .regular)
tipsView.addSubview(trailTitle)
trailTitle.snp.makeConstraints { make in
make.left.equalTo(16)
make.right.equalTo(-16)
make.top.equalTo(subTitle.snp.bottom).offset(8)
make.top.equalTo(subTitle.snp.bottom).offset(8.RH())
}
tipsView.snp.makeConstraints { make in
make.top.equalTo(animationView.snp.bottom).offset(ScreenH <= 667.0 ? 50 : 92.RH())
make.top.equalTo(animationView.snp.bottom).offset(92.RH())
make.left.right.equalToSuperview().inset(12)
make.height.equalTo(110)
make.height.equalTo(110.RH())
}
let freespace = UILabel()
freespace.font = UIFont.systemFont(ofSize: 12, weight: .bold)
freespace.font = UIFont.scaledSystemFont(ofSize: 12, weight: .bold)
freespace.text = "FREE SPACE"
freespace.textColor = UIColor.colorWithHex(hexStr: "#B3B3B3")
addSubview(freespace)
sizeLabel = UILabel()
sizeLabel.text = "54.2 GB"
sizeLabel.textColor = UIColor.colorWithHex(hexStr: black3Color)
sizeLabel.font = UIFont.systemFont(ofSize: 12, weight: .bold)
sizeLabel.font = UIFont.scaledSystemFont(ofSize: 12, weight: .bold)
addSubview(sizeLabel)
freespace.snp.makeConstraints { make in
make.left.equalTo(icloudImage!.snp.right).offset(24.RW())
make.top.equalTo(titleLabel2!.snp.bottom).offset(42)
make.height.equalTo(17)
make.height.equalTo(17.RW())
}
sizeLabel.snp.makeConstraints { make in
make.top.equalTo(freespace.snp.bottom).offset(0)
make.left.equalTo(icloudImage!.snp.right).offset(24)
make.height.equalTo(39)
make.height.equalTo(39.RW())
}
let fullText = FileTool().formatBytes(FileTool().getStorageInfo(for: .free) ?? 0 )
// 创建一个可变的富文本字符串
let attributedString = NSMutableAttributedString(string: fullText)
// 设置前半部分(动态数值)的范围
let regularFont = UIFont.systemFont(ofSize: 28, weight: .bold) // 设置常规字体大小
let regularFont = UIFont.scaledSystemFont(ofSize: 28, weight: .bold) // 设置常规字体大小
attributedString.addAttribute(.font, value: regularFont, range: NSRange.init(location: 0,length:fullText.count-2))
// 设置“GB”部分的范围并将字体大小设置为12
let smallFont = UIFont.systemFont(ofSize: 12, weight: .bold) // 设置字体大小为12
let smallFont = UIFont.scaledSystemFont(ofSize: 12, weight: .bold) // 设置字体大小为12
attributedString.addAttribute(.font, value: smallFont, range:NSRange.init(location: fullText.count-2, length: 2))
// 将富文本赋值给UILabel
......@@ -538,8 +545,8 @@ class HomePayView:UIView {
payDueView.snp.makeConstraints { make in
make.left.right.equalToSuperview()
make.top.equalTo(tipsView.snp.bottom).offset(90)
make.height.equalTo(50)
make.top.equalTo(tipsView.snp.bottom).offset(90.RH())
make.height.equalTo(50.RH())
}
}
......@@ -556,12 +563,12 @@ class HomePayView:UIView {
let attributedString = NSMutableAttributedString(string: fullText)
// 设置前半部分(动态数值)的范围
let regularFont = UIFont.systemFont(ofSize: 18, weight: .regular) // 设置常规字体大小
let regularFont = UIFont.scaledSystemFont(ofSize: 18, weight: .regular) // 设置常规字体大小
let range1 = (fullText as NSString).range(of: sizeValue)
attributedString.addAttribute(.font, value: regularFont, range: range1)
// 设置“GB”部分的范围并将字体大小设置为12
let smallFont = UIFont.systemFont(ofSize: 14, weight: .regular) // 设置字体大小为12
let smallFont = UIFont.scaledSystemFont(ofSize: 14, weight: .regular) // 设置字体大小为12
let range2 = (fullText as NSString).range(of: unit)
attributedString.addAttribute(.font, value: smallFont, range: range2)
......
......@@ -23,7 +23,7 @@ class TipsDuplicatesSimilarController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
startBtn.layer.cornerRadius = 23
startBtn.layer.cornerRadius = 23.RH()
lineText.text = type.lineText
iconOne.image = UIImage.init(named: type.tipOneIcon)
......
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="23504" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait" appearance="light"/>
<device id="retina6_9" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23506"/>
......@@ -22,45 +22,45 @@
</placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<rect key="frame" x="0.0" y="0.0" width="440" height="956"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="tips_duplicates_1" translatesAutoresizingMaskIntoConstraints="NO" id="5sP-3G-R5V">
<rect key="frame" x="41" y="143" width="281" height="137.5"/>
<rect key="frame" x="41" y="185" width="346" height="137.66666666666663"/>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="2 Duplicates" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="XMa-dY-JFG">
<rect key="frame" x="40" y="105" width="97" height="20"/>
<rect key="frame" x="40" y="147" width="97" height="20"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="16"/>
<color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="tips_duplicates_1" translatesAutoresizingMaskIntoConstraints="NO" id="LIQ-mA-CKi">
<rect key="frame" x="41" y="338.5" width="281" height="137"/>
<rect key="frame" x="41" y="380.66666666666669" width="346" height="137.00000000000006"/>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="2 Duplicates" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="dRr-c6-YoB">
<rect key="frame" x="40" y="300.5" width="97" height="20"/>
<rect key="frame" x="40" y="342.66666666666669" width="97" height="20"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="16"/>
<color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Duplicates" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="U5t-M8-fCd">
<rect key="frame" x="119" y="502.5" width="125" height="30"/>
<rect key="frame" x="151.66666666666666" y="544.66666666666663" width="124.99999999999997" height="30"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="25"/>
<color key="textColor" red="0.10196078431372549" green="0.10196078431372549" blue="0.10196078431372549" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="OOD-68-wMD">
<rect key="frame" x="25" y="550.5" width="325" height="50.5"/>
<rect key="frame" x="25" y="592.66666666666663" width="390" height="50.333333333333371"/>
<string key="text">These are duplicate photos - they are completely identical to each other. Immediately delete all duplicate items and keep the original version.</string>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<color key="textColor" red="0.40000000000000002" green="0.40000000000000002" blue="0.40000000000000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="XPg-Ph-1k0">
<rect key="frame" x="15" y="591" width="345" height="46"/>
<rect key="frame" x="15" y="846" width="410" height="46"/>
<color key="backgroundColor" red="0.0" green="0.50980392156862742" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="46" id="DDB-jE-Azu"/>
<constraint firstAttribute="height" constant="46" id="DDB-jE-Azu" customClass="ScreenHeightRatioConstraint" customModule="PhoneManager" customModuleProvider="target"/>
</constraints>
<fontDescription key="fontDescription" type="boldSystem" pointSize="16"/>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
......@@ -96,7 +96,7 @@
</view>
</objects>
<resources>
<image name="tips_duplicates_1" width="281" height="137.5"/>
<image name="tips_duplicates_1" width="281" height="137.33332824707031"/>
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
......
......@@ -13,7 +13,7 @@ class TipsScreenShotController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
startBtn.layer.cornerRadius = 23
startBtn.layer.cornerRadius = 23.RH()
}
......
......@@ -31,7 +31,7 @@
<rect key="frame" x="15" y="822" width="400" height="46"/>
<color key="backgroundColor" red="0.0" green="0.50980392159999999" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="46" id="4Qc-vw-6p8"/>
<constraint firstAttribute="height" constant="46" id="4Qc-vw-6p8" customClass="ScreenHeightRatioConstraint" customModule="PhoneManager" customModuleProvider="target"/>
</constraints>
<fontDescription key="fontDescription" type="boldSystem" pointSize="16"/>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
......
......@@ -19,7 +19,7 @@ class TipsVideoPhotoController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
startBtn.layer.cornerRadius = 23
startBtn.layer.cornerRadius = 23.RH()
icon.image = UIImage.init(named: type.tipOneIcon)
......
......@@ -42,7 +42,7 @@
<rect key="frame" x="15" y="742" width="363" height="46"/>
<color key="backgroundColor" red="0.0" green="0.50980392159999999" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="46" id="bCa-jh-IT1"/>
<constraint firstAttribute="height" constant="46" id="bCa-jh-IT1" customClass="ScreenHeightRatioConstraint" customModule="PhoneManager" customModuleProvider="target"/>
</constraints>
<fontDescription key="fontDescription" type="boldSystem" pointSize="16"/>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
......
//
// UIFont+Ex.swift
// PhoneManager
//
// Created by edy on 2025/4/29.
//
import Foundation
import UIKit
extension UIFont {
/// 返回按比例缩放后的字体
/// - Parameter size: 原始字体大小
/// - Returns: 缩放后的字体
static func scaledSystemFont(ofSize size: CGFloat,weight:UIFont.Weight = .regular) -> UIFont {
let scale: CGFloat = RW // 这里可以根据需要调整缩放系数
return .systemFont(ofSize: size*scale, weight: weight)
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment