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())
}
}
}
}
......
......@@ -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"/>
......
......@@ -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