From 1d4465b496301f194e61617074801caf1338286b Mon Sep 17 00:00:00 2001 From: xaoxuu Date: Mon, 7 Aug 2023 13:19:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PHDemo/PHDemo.xcodeproj/project.pbxproj | 26 ++++++++++++++----- .../xcshareddata/swiftpm/Package.resolved | 14 ++++++++++ Sources/ProHUD/Toast/ToastWindow.swift | 2 +- 3 files changed, 34 insertions(+), 8 deletions(-) create mode 100644 PHDemo/PHDemo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved diff --git a/PHDemo/PHDemo.xcodeproj/project.pbxproj b/PHDemo/PHDemo.xcodeproj/project.pbxproj index 06b09d1..0e6cd5f 100644 --- a/PHDemo/PHDemo.xcodeproj/project.pbxproj +++ b/PHDemo/PHDemo.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 60; + objectVersion = 55; objects = { /* Begin PBXBuildFile section */ @@ -12,6 +12,7 @@ CD6537C328C35E6200A5981B /* ToastVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD6537C228C35E6200A5981B /* ToastVC.swift */; }; CD6537C528C35F2C00A5981B /* SheetVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD6537C428C35F2C00A5981B /* SheetVC.swift */; }; CD6AE8A32A7CC1BA0044E53D /* SnapKit in Frameworks */ = {isa = PBXBuildFile; productRef = CD6AE8A22A7CC1BA0044E53D /* SnapKit */; }; + CD891BCD2A80B58E00848BBC /* SnapKit in Frameworks */ = {isa = PBXBuildFile; productRef = CD891BCC2A80B58E00848BBC /* SnapKit */; }; CD8EEF3B28BC5C7200E660EA /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD8EEF3A28BC5C7200E660EA /* AppDelegate.swift */; }; CD8EEF3D28BC5C7200E660EA /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD8EEF3C28BC5C7200E660EA /* SceneDelegate.swift */; }; CD8EEF4228BC5C7200E660EA /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = CD8EEF4028BC5C7200E660EA /* Main.storyboard */; }; @@ -46,6 +47,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + CD891BCD2A80B58E00848BBC /* SnapKit in Frameworks */, CDB6A2A228BC5F4600DEC80D /* ProHUD in Frameworks */, CD6AE8A32A7CC1BA0044E53D /* SnapKit in Frameworks */, ); @@ -126,6 +128,7 @@ packageProductDependencies = ( CDB6A2A128BC5F4600DEC80D /* ProHUD */, CD6AE8A22A7CC1BA0044E53D /* SnapKit */, + CD891BCC2A80B58E00848BBC /* SnapKit */, ); productName = PHDemo; productReference = CD8EEF3728BC5C7200E660EA /* PHDemo.app */; @@ -156,7 +159,7 @@ ); mainGroup = CD8EEF2E28BC5C7200E660EA; packageReferences = ( - CD6AE8A12A7CC1BA0044E53D /* XCLocalSwiftPackageReference "../../SnapKit" */, + CD891BCB2A80B58E00848BBC /* XCRemoteSwiftPackageReference "SnapKit" */, ); productRefGroup = CD8EEF3828BC5C7200E660EA /* Products */; projectDirPath = ""; @@ -414,18 +417,27 @@ }; /* End XCConfigurationList section */ -/* Begin XCLocalSwiftPackageReference section */ - CD6AE8A12A7CC1BA0044E53D /* XCLocalSwiftPackageReference "../../SnapKit" */ = { - isa = XCLocalSwiftPackageReference; - relativePath = ../../SnapKit; +/* Begin XCRemoteSwiftPackageReference section */ + CD891BCB2A80B58E00848BBC /* XCRemoteSwiftPackageReference "SnapKit" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://git.xaox.cc/mirrors/SnapKit.git"; + requirement = { + kind = upToNextMajorVersion; + minimumVersion = 5.6.0; + }; }; -/* End XCLocalSwiftPackageReference section */ +/* End XCRemoteSwiftPackageReference section */ /* Begin XCSwiftPackageProductDependency section */ CD6AE8A22A7CC1BA0044E53D /* SnapKit */ = { isa = XCSwiftPackageProductDependency; productName = SnapKit; }; + CD891BCC2A80B58E00848BBC /* SnapKit */ = { + isa = XCSwiftPackageProductDependency; + package = CD891BCB2A80B58E00848BBC /* XCRemoteSwiftPackageReference "SnapKit" */; + productName = SnapKit; + }; CDB6A2A128BC5F4600DEC80D /* ProHUD */ = { isa = XCSwiftPackageProductDependency; productName = ProHUD; diff --git a/PHDemo/PHDemo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/PHDemo/PHDemo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved new file mode 100644 index 0000000..0c651bf --- /dev/null +++ b/PHDemo/PHDemo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -0,0 +1,14 @@ +{ + "pins" : [ + { + "identity" : "snapkit", + "kind" : "remoteSourceControl", + "location" : "https://git.xaox.cc/mirrors/SnapKit.git", + "state" : { + "revision" : "f222cbdf325885926566172f6f5f06af95473158", + "version" : "5.6.0" + } + } + ], + "version" : 2 +} diff --git a/Sources/ProHUD/Toast/ToastWindow.swift b/Sources/ProHUD/Toast/ToastWindow.swift index e6d6d2b..bf5a163 100644 --- a/Sources/ProHUD/Toast/ToastWindow.swift +++ b/Sources/ProHUD/Toast/ToastWindow.swift @@ -128,7 +128,7 @@ fileprivate extension ToastWindow { let config = window.toast.config var y = window.frame.origin.y if i == 0 { - y = max(AppContext.appWindow?.layoutMargins.top ?? config.margin, config.margin) + y = max(AppContext.appWindow?.safeAreaInsets.top ?? config.margin, config.margin) } else { if i - 1 < windows.count && i > 0 { y = config.margin + windows[i-1].frame.maxY