From 644ddb06f0da0a5156849e03835bc7c079baa875 Mon Sep 17 00:00:00 2001 From: "gleb.gagarin" Date: Tue, 8 Dec 2020 10:18:40 +0700 Subject: [PATCH 01/13] Dimbacgr --- PanModal/View/DimmedView.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PanModal/View/DimmedView.swift b/PanModal/View/DimmedView.swift index 6fdd1d8b..255cc8e2 100644 --- a/PanModal/View/DimmedView.swift +++ b/PanModal/View/DimmedView.swift @@ -55,7 +55,7 @@ public class DimmedView: UIView { // MARK: - Initializers - init(dimColor: UIColor = UIColor.black.withAlphaComponent(0.7)) { + init(dimColor: UIColor = UIColor.black.withAlphaComponent(0.4)) { super.init(frame: .zero) alpha = 0.0 backgroundColor = dimColor From 10b9043c7661440e47b524f47064ff9d1adfc2bd Mon Sep 17 00:00:00 2001 From: "gleb.gagarin" Date: Tue, 8 Dec 2020 10:20:48 +0700 Subject: [PATCH 02/13] Up version --- PanModal.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PanModal.podspec b/PanModal.podspec index 22b04eeb..feecfa62 100644 --- a/PanModal.podspec +++ b/PanModal.podspec @@ -8,7 +8,7 @@ Pod::Spec.new do |s| s.name = 'PanModal' - s.version = '1.2.7' + s.version = '1.2.8' s.summary = 'PanModal is an elegant and highly customizable presentation API for constructing bottom sheet modals on iOS.' # This description is used to generate tags and improve search results. From 003aeff1435da638378849821cb1fa6f305b4820 Mon Sep 17 00:00:00 2001 From: "gleb.gagarin" Date: Tue, 8 Dec 2020 10:47:23 +0700 Subject: [PATCH 03/13] Alpha dimmed view case percent --- PanModal/View/DimmedView.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PanModal/View/DimmedView.swift b/PanModal/View/DimmedView.swift index 255cc8e2..bd679a68 100644 --- a/PanModal/View/DimmedView.swift +++ b/PanModal/View/DimmedView.swift @@ -36,7 +36,7 @@ public class DimmedView: UIView { case .off: alpha = 0.0 case .percent(let percentage): - alpha = max(0.0, min(1.0, percentage)) + alpha = 0.4 } } } From 4484ec0447b970896953d5b14328315a701170b1 Mon Sep 17 00:00:00 2001 From: "gleb.gagarin" Date: Tue, 8 Dec 2020 10:59:41 +0700 Subject: [PATCH 04/13] Up version --- PanModal.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PanModal.podspec b/PanModal.podspec index feecfa62..a6681807 100644 --- a/PanModal.podspec +++ b/PanModal.podspec @@ -8,7 +8,7 @@ Pod::Spec.new do |s| s.name = 'PanModal' - s.version = '1.2.8' + s.version = '1.2.9' s.summary = 'PanModal is an elegant and highly customizable presentation API for constructing bottom sheet modals on iOS.' # This description is used to generate tags and improve search results. From 7a1e08c13a5083395fccc00551b3057d8b02803a Mon Sep 17 00:00:00 2001 From: "gleb.gagarin" Date: Tue, 8 Dec 2020 13:19:49 +0700 Subject: [PATCH 05/13] 1.2.10 --- PanModal.podspec | 2 +- PanModal/View/DimmedView.swift | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/PanModal.podspec b/PanModal.podspec index a6681807..a4b83d8b 100644 --- a/PanModal.podspec +++ b/PanModal.podspec @@ -8,7 +8,7 @@ Pod::Spec.new do |s| s.name = 'PanModal' - s.version = '1.2.9' + s.version = '1.2.10' s.summary = 'PanModal is an elegant and highly customizable presentation API for constructing bottom sheet modals on iOS.' # This description is used to generate tags and improve search results. diff --git a/PanModal/View/DimmedView.swift b/PanModal/View/DimmedView.swift index bd679a68..53a09c9f 100644 --- a/PanModal/View/DimmedView.swift +++ b/PanModal/View/DimmedView.swift @@ -32,11 +32,11 @@ public class DimmedView: UIView { didSet { switch dimState { case .max: - alpha = 1.0 + alpha = 0.1 case .off: alpha = 0.0 case .percent(let percentage): - alpha = 0.4 + alpha = 0.1 } } } @@ -55,7 +55,7 @@ public class DimmedView: UIView { // MARK: - Initializers - init(dimColor: UIColor = UIColor.black.withAlphaComponent(0.4)) { + init(dimColor: UIColor = UIColor.black.withAlphaComponent(0.1)) { super.init(frame: .zero) alpha = 0.0 backgroundColor = dimColor From 7afa2854fa7a66f84d26d24944411e10fafcbfb7 Mon Sep 17 00:00:00 2001 From: "gleb.gagarin" Date: Tue, 8 Dec 2020 13:29:40 +0700 Subject: [PATCH 06/13] 1.2.11 --- PanModal.podspec | 2 +- PanModal/View/DimmedView.swift | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/PanModal.podspec b/PanModal.podspec index a4b83d8b..7f50bf31 100644 --- a/PanModal.podspec +++ b/PanModal.podspec @@ -8,7 +8,7 @@ Pod::Spec.new do |s| s.name = 'PanModal' - s.version = '1.2.10' + s.version = '1.2.11' s.summary = 'PanModal is an elegant and highly customizable presentation API for constructing bottom sheet modals on iOS.' # This description is used to generate tags and improve search results. diff --git a/PanModal/View/DimmedView.swift b/PanModal/View/DimmedView.swift index 53a09c9f..34e9fc36 100644 --- a/PanModal/View/DimmedView.swift +++ b/PanModal/View/DimmedView.swift @@ -32,11 +32,11 @@ public class DimmedView: UIView { didSet { switch dimState { case .max: - alpha = 0.1 + alpha = 0.2 case .off: alpha = 0.0 case .percent(let percentage): - alpha = 0.1 + alpha = 0.2 } } } @@ -55,7 +55,7 @@ public class DimmedView: UIView { // MARK: - Initializers - init(dimColor: UIColor = UIColor.black.withAlphaComponent(0.1)) { + init(dimColor: UIColor = UIColor.black.withAlphaComponent(0.2)) { super.init(frame: .zero) alpha = 0.0 backgroundColor = dimColor From ba8af887d961a873166faabda180518bcc26ef9e Mon Sep 17 00:00:00 2001 From: Semen Kologrivov Date: Thu, 7 Jul 2022 12:39:37 +0700 Subject: [PATCH 07/13] feat: Add methods for working with keyboard and nav controllers --- .../contents.xcworkspacedata | 7 + Derived/InfoPlists/PanModal-Info.plist | 22 + PanModal.xcodeproj/project.pbxproj | 723 ++++++++++++++++++ .../contents.xcworkspacedata | 7 + .../PanModalNavigationController.swift | 143 ++++ .../PanModalPresentationController.swift | 29 +- ...PanModalKeyboardPresentable+Defaults.swift | 35 + .../PanModalKeyboardPresentable.swift | 27 + ...PanModalPresentable+UIViewController.swift | 13 + PanModal/View/DimmedView.swift | 6 +- 10 files changed, 1004 insertions(+), 8 deletions(-) create mode 100644 .swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata create mode 100644 Derived/InfoPlists/PanModal-Info.plist create mode 100644 PanModal.xcodeproj/project.pbxproj create mode 100644 PanModal.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 PanModal/Controller/PanModalNavigationController.swift create mode 100644 PanModal/KeyboardPresentable/PanModalKeyboardPresentable+Defaults.swift create mode 100644 PanModal/KeyboardPresentable/PanModalKeyboardPresentable.swift diff --git a/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata b/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata new file mode 100644 index 00000000..919434a6 --- /dev/null +++ b/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Derived/InfoPlists/PanModal-Info.plist b/Derived/InfoPlists/PanModal-Info.plist new file mode 100644 index 00000000..323e5ecf --- /dev/null +++ b/Derived/InfoPlists/PanModal-Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/PanModal.xcodeproj/project.pbxproj b/PanModal.xcodeproj/project.pbxproj new file mode 100644 index 00000000..c64d46bd --- /dev/null +++ b/PanModal.xcodeproj/project.pbxproj @@ -0,0 +1,723 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 55; + objects = { + +/* Begin PBXBuildFile section */ + 1D34D9B02EB1AC010D28A788 /* PanModalHeight.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABF65B3D44F3AC87AC56675B /* PanModalHeight.swift */; }; + 2D12137F8718A3970F14AFA1 /* PanModalAnimator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 247F269CB9E79F921797C868 /* PanModalAnimator.swift */; }; + 397E8D08287694BE00550BA3 /* PanModalKeyboardPresentable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 397E8D07287694BE00550BA3 /* PanModalKeyboardPresentable.swift */; }; + 397E8D0B2876956C00550BA3 /* PanModalKeyboardPresentable+Defaults.swift in Sources */ = {isa = PBXBuildFile; fileRef = 397E8D0A2876956C00550BA3 /* PanModalKeyboardPresentable+Defaults.swift */; }; + 397E8D0D2876962D00550BA3 /* PanModalNavigationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 397E8D0C2876962D00550BA3 /* PanModalNavigationController.swift */; }; + 3FE4AC79C0FFC08A763B73CA /* PanModalPresenter.swift in Sources */ = {isa = PBXBuildFile; fileRef = B88988866B1E9B8041D8CDBC /* PanModalPresenter.swift */; }; + 4ADB47FF2175663ADCA39476 /* PanModalPresentable.swift in Sources */ = {isa = PBXBuildFile; fileRef = CEF747134DCC92CD1E6B1A1C /* PanModalPresentable.swift */; }; + 568E31FE1C634747DF96BF89 /* PanModalPresentationAnimator.swift in Sources */ = {isa = PBXBuildFile; fileRef = BE33C1773BA187DC156A1573 /* PanModalPresentationAnimator.swift */; }; + 7F6A9D4296C19BBC01898E49 /* PanModalPresentable+Defaults.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3BE99A40E84171281F1D649 /* PanModalPresentable+Defaults.swift */; }; + 847DF45F2EE236DC6632D86B /* PanContainerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6182FE3A8D6D219CE0CDCCCF /* PanContainerView.swift */; }; + A5E91380A4091F2092B662CE /* PanModalPresentable+LayoutHelpers.swift in Sources */ = {isa = PBXBuildFile; fileRef = BCF005E45B676AD3F7B78FAD /* PanModalPresentable+LayoutHelpers.swift */; }; + A7D3582C1ADA0E60361A9B30 /* UIViewController+PanModalPresenter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6E9105024A9438C1AC2D8D29 /* UIViewController+PanModalPresenter.swift */; }; + B9E8259F773D27BAA416DCDB /* PanModalPresentationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D58F1F9245FCF277E33A16FE /* PanModalPresentationController.swift */; }; + BD2A2F384AA6A669BB094AFE /* DimmedView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D9359135D025D85DF75DE4F5 /* DimmedView.swift */; }; + DF004916923A0853BE2A6EF3 /* PanModalPresentable+UIViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A6D777902F927D45E55BD58 /* PanModalPresentable+UIViewController.swift */; }; + EB726BFFEE56C0BF9E060581 /* PanModalPresentationDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 666A2C96EA5A339D2BF1AFD7 /* PanModalPresentationDelegate.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 4B713D3FD1A9A1B3FD2103F6 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 20E8316EBC147D20D0D4AFCC /* PanModal.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PanModal.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 247F269CB9E79F921797C868 /* PanModalAnimator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PanModalAnimator.swift; sourceTree = ""; }; + 397E8D07287694BE00550BA3 /* PanModalKeyboardPresentable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PanModalKeyboardPresentable.swift; sourceTree = ""; }; + 397E8D0A2876956C00550BA3 /* PanModalKeyboardPresentable+Defaults.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "PanModalKeyboardPresentable+Defaults.swift"; sourceTree = ""; }; + 397E8D0C2876962D00550BA3 /* PanModalNavigationController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PanModalNavigationController.swift; sourceTree = ""; }; + 5D4E1B52C8DEB3611236C530 /* PanModal-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = "PanModal-Info.plist"; sourceTree = ""; }; + 6182FE3A8D6D219CE0CDCCCF /* PanContainerView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PanContainerView.swift; sourceTree = ""; }; + 666A2C96EA5A339D2BF1AFD7 /* PanModalPresentationDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PanModalPresentationDelegate.swift; sourceTree = ""; }; + 6E9105024A9438C1AC2D8D29 /* UIViewController+PanModalPresenter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIViewController+PanModalPresenter.swift"; sourceTree = ""; }; + 9A6D777902F927D45E55BD58 /* PanModalPresentable+UIViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "PanModalPresentable+UIViewController.swift"; sourceTree = ""; }; + ABF65B3D44F3AC87AC56675B /* PanModalHeight.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PanModalHeight.swift; sourceTree = ""; }; + B3BE99A40E84171281F1D649 /* PanModalPresentable+Defaults.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "PanModalPresentable+Defaults.swift"; sourceTree = ""; }; + B88988866B1E9B8041D8CDBC /* PanModalPresenter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PanModalPresenter.swift; sourceTree = ""; }; + BCF005E45B676AD3F7B78FAD /* PanModalPresentable+LayoutHelpers.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "PanModalPresentable+LayoutHelpers.swift"; sourceTree = ""; }; + BE33C1773BA187DC156A1573 /* PanModalPresentationAnimator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PanModalPresentationAnimator.swift; sourceTree = ""; }; + CEF747134DCC92CD1E6B1A1C /* PanModalPresentable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PanModalPresentable.swift; sourceTree = ""; }; + D58F1F9245FCF277E33A16FE /* PanModalPresentationController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PanModalPresentationController.swift; sourceTree = ""; }; + D9359135D025D85DF75DE4F5 /* DimmedView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DimmedView.swift; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 9B001E5E298EBB4F06957710 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 0E15AB33DF0F04ED376AD871 /* Products */ = { + isa = PBXGroup; + children = ( + 20E8316EBC147D20D0D4AFCC /* PanModal.framework */, + ); + name = Products; + sourceTree = ""; + }; + 1FDDFE36812B21100970C573 = { + isa = PBXGroup; + children = ( + D3D84F2F13701F701BFE149E /* Project */, + 357EF2A08DF98FB9EFAF2C72 /* Frameworks */, + 0E15AB33DF0F04ED376AD871 /* Products */, + ); + sourceTree = ""; + }; + 26D371B632C7963B57350947 /* Animator */ = { + isa = PBXGroup; + children = ( + 247F269CB9E79F921797C868 /* PanModalAnimator.swift */, + BE33C1773BA187DC156A1573 /* PanModalPresentationAnimator.swift */, + ); + path = Animator; + sourceTree = ""; + }; + 357EF2A08DF98FB9EFAF2C72 /* Frameworks */ = { + isa = PBXGroup; + children = ( + ); + name = Frameworks; + sourceTree = ""; + }; + 397E8D092876954A00550BA3 /* KeyboardPresentable */ = { + isa = PBXGroup; + children = ( + 397E8D07287694BE00550BA3 /* PanModalKeyboardPresentable.swift */, + 397E8D0A2876956C00550BA3 /* PanModalKeyboardPresentable+Defaults.swift */, + ); + path = KeyboardPresentable; + sourceTree = ""; + }; + 50511DA5F1A1D1544D4692A1 /* InfoPlists */ = { + isa = PBXGroup; + children = ( + 5D4E1B52C8DEB3611236C530 /* PanModal-Info.plist */, + ); + path = InfoPlists; + sourceTree = ""; + }; + 5741396B55D075D098E40E92 /* Presentable */ = { + isa = PBXGroup; + children = ( + ABF65B3D44F3AC87AC56675B /* PanModalHeight.swift */, + CEF747134DCC92CD1E6B1A1C /* PanModalPresentable.swift */, + B3BE99A40E84171281F1D649 /* PanModalPresentable+Defaults.swift */, + BCF005E45B676AD3F7B78FAD /* PanModalPresentable+LayoutHelpers.swift */, + 9A6D777902F927D45E55BD58 /* PanModalPresentable+UIViewController.swift */, + ); + path = Presentable; + sourceTree = ""; + }; + 5B2E705D3A9A0381ED241E6A /* Presenter */ = { + isa = PBXGroup; + children = ( + B88988866B1E9B8041D8CDBC /* PanModalPresenter.swift */, + 6E9105024A9438C1AC2D8D29 /* UIViewController+PanModalPresenter.swift */, + ); + path = Presenter; + sourceTree = ""; + }; + 6230FC53F41790705FFE9704 /* View */ = { + isa = PBXGroup; + children = ( + D9359135D025D85DF75DE4F5 /* DimmedView.swift */, + 6182FE3A8D6D219CE0CDCCCF /* PanContainerView.swift */, + ); + path = View; + sourceTree = ""; + }; + 72C84C35A71A983A26D3CC70 /* Controller */ = { + isa = PBXGroup; + children = ( + D58F1F9245FCF277E33A16FE /* PanModalPresentationController.swift */, + 397E8D0C2876962D00550BA3 /* PanModalNavigationController.swift */, + ); + path = Controller; + sourceTree = ""; + }; + C5E5E974319C26486287CE0D /* Delegate */ = { + isa = PBXGroup; + children = ( + 666A2C96EA5A339D2BF1AFD7 /* PanModalPresentationDelegate.swift */, + ); + path = Delegate; + sourceTree = ""; + }; + CBC53B798DC85A88A0F37788 /* PanModal */ = { + isa = PBXGroup; + children = ( + 397E8D092876954A00550BA3 /* KeyboardPresentable */, + 26D371B632C7963B57350947 /* Animator */, + 72C84C35A71A983A26D3CC70 /* Controller */, + C5E5E974319C26486287CE0D /* Delegate */, + 5741396B55D075D098E40E92 /* Presentable */, + 5B2E705D3A9A0381ED241E6A /* Presenter */, + 6230FC53F41790705FFE9704 /* View */, + ); + path = PanModal; + sourceTree = ""; + }; + D3D84F2F13701F701BFE149E /* Project */ = { + isa = PBXGroup; + children = ( + E2BEA16CB73FB082C98CE042 /* Derived */, + CBC53B798DC85A88A0F37788 /* PanModal */, + ); + name = Project; + sourceTree = ""; + }; + E2BEA16CB73FB082C98CE042 /* Derived */ = { + isa = PBXGroup; + children = ( + 50511DA5F1A1D1544D4692A1 /* InfoPlists */, + ); + path = Derived; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + A1D7F00CED08E18E42393F30 /* PanModal */ = { + isa = PBXNativeTarget; + buildConfigurationList = 1EF84CF17AB6EB3D75687471 /* Build configuration list for PBXNativeTarget "PanModal" */; + buildPhases = ( + 94AAB8E6AC75DF47314D92B0 /* Sources */, + F66597CDECE92B03C3CEA1E8 /* Resources */, + 4B713D3FD1A9A1B3FD2103F6 /* Embed Frameworks */, + 9B001E5E298EBB4F06957710 /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = PanModal; + productName = PanModal; + productReference = 20E8316EBC147D20D0D4AFCC /* PanModal.framework */; + productType = "com.apple.product-type.framework"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 51DD5472E1F398FE6B6A5302 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 9999; + }; + buildConfigurationList = CCC9A83A9BFD2A0A523DC090 /* Build configuration list for PBXProject "PanModal" */; + compatibilityVersion = "Xcode 13.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + Base, + en, + ); + mainGroup = 1FDDFE36812B21100970C573; + productRefGroup = 0E15AB33DF0F04ED376AD871 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + A1D7F00CED08E18E42393F30 /* PanModal */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + F66597CDECE92B03C3CEA1E8 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 94AAB8E6AC75DF47314D92B0 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 2D12137F8718A3970F14AFA1 /* PanModalAnimator.swift in Sources */, + 397E8D0D2876962D00550BA3 /* PanModalNavigationController.swift in Sources */, + 568E31FE1C634747DF96BF89 /* PanModalPresentationAnimator.swift in Sources */, + 397E8D0B2876956C00550BA3 /* PanModalKeyboardPresentable+Defaults.swift in Sources */, + B9E8259F773D27BAA416DCDB /* PanModalPresentationController.swift in Sources */, + EB726BFFEE56C0BF9E060581 /* PanModalPresentationDelegate.swift in Sources */, + 397E8D08287694BE00550BA3 /* PanModalKeyboardPresentable.swift in Sources */, + 1D34D9B02EB1AC010D28A788 /* PanModalHeight.swift in Sources */, + 7F6A9D4296C19BBC01898E49 /* PanModalPresentable+Defaults.swift in Sources */, + A5E91380A4091F2092B662CE /* PanModalPresentable+LayoutHelpers.swift in Sources */, + DF004916923A0853BE2A6EF3 /* PanModalPresentable+UIViewController.swift in Sources */, + 4ADB47FF2175663ADCA39476 /* PanModalPresentable.swift in Sources */, + 3FE4AC79C0FFC08A763B73CA /* PanModalPresenter.swift in Sources */, + A7D3582C1ADA0E60361A9B30 /* UIViewController+PanModalPresenter.swift in Sources */, + BD2A2F384AA6A669BB094AFE /* DimmedView.swift in Sources */, + 847DF45F2EE236DC6632D86B /* PanContainerView.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 0668EADCA7021F53E887B1AD /* RC */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MTL_ENABLE_DEBUG_INFO = NO; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0.0; + VALIDATE_PRODUCT = YES; + }; + name = RC; + }; + 1D56DC7D6BC19BC32E163F99 /* Beta */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MTL_ENABLE_DEBUG_INFO = NO; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0.0; + VALIDATE_PRODUCT = YES; + }; + name = Beta; + }; + 22DDDC7256B72FA8475E139A /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MTL_ENABLE_DEBUG_INFO = NO; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0.0; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 9F845F0EE0D93C7D3FF56572 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0.0; + }; + name = Debug; + }; + AFB1220559985510119E2D47 /* Beta */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = YES; + CLANG_ENABLE_OBJC_WEAK = NO; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO; + CODE_SIGN_IDENTITY = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_STRICT_OBJC_MSGSEND = NO; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PLATFORM_DIR)/Developer/Library/Frameworks", + ); + GCC_NO_COMMON_BLOCKS = NO; + GCC_PREPROCESSOR_DEFINITIONS = ( + "$(inherited)", + "SWIFT_PACKAGE=1", + ); + GCC_WARN_INHIBIT_ALL_WARNINGS = YES; + INFOPLIST_FILE = "Derived/InfoPlists/PanModal-Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + MACH_O_TYPE = staticlib; + PRODUCT_BUNDLE_IDENTIFIER = PanModal; + PRODUCT_NAME = PanModal; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SUPPORTS_MACCATALYST = NO; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) SWIFT_PACKAGE"; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_SUPPRESS_WARNINGS = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + USE_HEADERMAP = NO; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Beta; + }; + B2DA13120AF1D024E631DAC6 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = YES; + CLANG_ENABLE_OBJC_WEAK = NO; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO; + CODE_SIGN_IDENTITY = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_STRICT_OBJC_MSGSEND = NO; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PLATFORM_DIR)/Developer/Library/Frameworks", + ); + GCC_NO_COMMON_BLOCKS = NO; + GCC_PREPROCESSOR_DEFINITIONS = ( + "$(inherited)", + "SWIFT_PACKAGE=1", + ); + GCC_WARN_INHIBIT_ALL_WARNINGS = YES; + INFOPLIST_FILE = "Derived/InfoPlists/PanModal-Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + MACH_O_TYPE = staticlib; + PRODUCT_BUNDLE_IDENTIFIER = PanModal; + PRODUCT_NAME = PanModal; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SUPPORTS_MACCATALYST = NO; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) SWIFT_PACKAGE"; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_SUPPRESS_WARNINGS = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + USE_HEADERMAP = NO; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + F97D3E78614357A71CE33B7F /* RC */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = YES; + CLANG_ENABLE_OBJC_WEAK = NO; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO; + CODE_SIGN_IDENTITY = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_STRICT_OBJC_MSGSEND = NO; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PLATFORM_DIR)/Developer/Library/Frameworks", + ); + GCC_NO_COMMON_BLOCKS = NO; + GCC_PREPROCESSOR_DEFINITIONS = ( + "$(inherited)", + "SWIFT_PACKAGE=1", + ); + GCC_WARN_INHIBIT_ALL_WARNINGS = YES; + INFOPLIST_FILE = "Derived/InfoPlists/PanModal-Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + MACH_O_TYPE = staticlib; + PRODUCT_BUNDLE_IDENTIFIER = PanModal; + PRODUCT_NAME = PanModal; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SUPPORTS_MACCATALYST = NO; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) SWIFT_PACKAGE"; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_SUPPRESS_WARNINGS = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + USE_HEADERMAP = NO; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = RC; + }; + FE85DC51A522D595FA5E00E8 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = YES; + CLANG_ENABLE_OBJC_WEAK = NO; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO; + CODE_SIGN_IDENTITY = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_STRICT_OBJC_MSGSEND = NO; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PLATFORM_DIR)/Developer/Library/Frameworks", + ); + GCC_NO_COMMON_BLOCKS = NO; + GCC_PREPROCESSOR_DEFINITIONS = ( + "$(inherited)", + "SWIFT_PACKAGE=1", + ); + GCC_WARN_INHIBIT_ALL_WARNINGS = YES; + INFOPLIST_FILE = "Derived/InfoPlists/PanModal-Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + MACH_O_TYPE = staticlib; + PRODUCT_BUNDLE_IDENTIFIER = PanModal; + PRODUCT_NAME = PanModal; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SUPPORTS_MACCATALYST = NO; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) DEBUG SWIFT_PACKAGE"; + SWIFT_COMPILATION_MODE = singlefile; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_SUPPRESS_WARNINGS = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + USE_HEADERMAP = NO; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 1EF84CF17AB6EB3D75687471 /* Build configuration list for PBXNativeTarget "PanModal" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + AFB1220559985510119E2D47 /* Beta */, + FE85DC51A522D595FA5E00E8 /* Debug */, + F97D3E78614357A71CE33B7F /* RC */, + B2DA13120AF1D024E631DAC6 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + CCC9A83A9BFD2A0A523DC090 /* Build configuration list for PBXProject "PanModal" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1D56DC7D6BC19BC32E163F99 /* Beta */, + 9F845F0EE0D93C7D3FF56572 /* Debug */, + 0668EADCA7021F53E887B1AD /* RC */, + 22DDDC7256B72FA8475E139A /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 51DD5472E1F398FE6B6A5302 /* Project object */; +} diff --git a/PanModal.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/PanModal.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 00000000..919434a6 --- /dev/null +++ b/PanModal.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/PanModal/Controller/PanModalNavigationController.swift b/PanModal/Controller/PanModalNavigationController.swift new file mode 100644 index 00000000..a4f2fa4e --- /dev/null +++ b/PanModal/Controller/PanModalNavigationController.swift @@ -0,0 +1,143 @@ +// +// PanModalNavigationController.swift +// PanModal +// +// Created by Semen Kologrivov on 07.07.2022. +// +import UIKit + +open class PanModalNavController: UINavigationController, PanModalPresentable { + + public var currentHeight: CGFloat = .zero + public var currentStateKeyboardIsShown = false + + public var presentViewController: (UIViewController & PanModalPresentable) { + guard let viewControllers = self.viewControllers.last as? (UIViewController & PanModalPresentable) else { + fatalError("impl top controller PanModalPresentable") + } + + return viewControllers + } + + open func updatePanModal(toState state: PanModalPresentationController.PresentationState = .longForm) { + let inset = self.panScrollable?.contentInset ?? .zero + + self.panModalSetNeedsLayoutUpdate() + self.panModalTransition(to: state) + + self.panScrollable?.contentInset = inset + } + +// MARK: - PanModalPresentable + open var panScrollable: UIScrollView? { + self.presentViewController.panScrollable + } + + open var topOffset: CGFloat { + self.presentViewController.topOffset + } + + open var longFormHeight: PanModalHeight { + guard let panScrollable = self.presentViewController as? PanModalKeyboardPresentable else { + return .contentHeight(.zero) + } + + let height = panScrollable.contentWithKeyboardHeight + + if abs(height - self.currentHeight) < 5 { + return .contentHeight(self.currentHeight) + } + + self.currentHeight = height + + return .contentHeight(height) + } + + open var cornerRadius: CGFloat { + self.presentViewController.cornerRadius + } + + open var springDamping: CGFloat { + 1 + } + + open var transitionDuration: Double { + self.presentViewController.transitionDuration + } + + open var transitionAnimationOptions: UIView.AnimationOptions { + self.presentViewController.transitionAnimationOptions + } + + open var panModalBackgroundColor: UIColor { + self.presentViewController.panModalBackgroundColor + } + + open var dragIndicatorBackgroundColor: UIColor { + self.presentViewController.dragIndicatorBackgroundColor + } + + open var scrollIndicatorInsets: UIEdgeInsets { + self.presentViewController.scrollIndicatorInsets + } + + open var anchorModalToLongForm: Bool { + self.presentViewController.anchorModalToLongForm + } + + open var allowsExtendedPanScrolling: Bool { + self.presentViewController.allowsExtendedPanScrolling + } + + open var allowsDragToDismiss: Bool { + self.presentViewController.allowsDragToDismiss + } + + open var allowsTapToDismiss: Bool { + self.presentViewController.allowsTapToDismiss + } + + open var isUserInteractionEnabled: Bool { + self.presentViewController.isUserInteractionEnabled + } + + open var isHapticFeedbackEnabled: Bool { + self.presentViewController.isHapticFeedbackEnabled + } + + open var shouldRoundTopCorners: Bool { + self.presentViewController.shouldRoundTopCorners + } + + open var showDragIndicator: Bool { + self.presentViewController.showDragIndicator + } + + open func shouldRespond(to panModalGestureRecognizer: UIPanGestureRecognizer) -> Bool { + self.presentViewController.shouldRespond(to: panModalGestureRecognizer) + } + + open func willRespond(to panModalGestureRecognizer: UIPanGestureRecognizer) { + self.presentViewController.willRespond(to: panModalGestureRecognizer) + } + + open func shouldPrioritize(panModalGestureRecognizer: UIPanGestureRecognizer) -> Bool { + self.presentViewController.shouldPrioritize(panModalGestureRecognizer: panModalGestureRecognizer) + } + + open func shouldTransition(to state: PanModalPresentationController.PresentationState) -> Bool { + self.presentViewController.shouldTransition(to: state) + } + + open func willTransition(to state: PanModalPresentationController.PresentationState) { + self.presentViewController.willTransition(to: state) + } + + open func panModalWillDismiss() { + self.presentViewController.panModalWillDismiss() + } + + open func panModalDidDismiss() { + self.presentViewController.panModalDidDismiss() + } +} diff --git a/PanModal/Controller/PanModalPresentationController.swift b/PanModal/Controller/PanModalPresentationController.swift index 11fb2a6e..2ef9b650 100644 --- a/PanModal/Controller/PanModalPresentationController.swift +++ b/PanModal/Controller/PanModalPresentationController.swift @@ -67,6 +67,8 @@ open class PanModalPresentationController: UIPresentationController { */ private var scrollViewYOffset: CGFloat = 0.0 + private var scrollView: UIScrollView? + /** An observer for the scroll view content offset */ @@ -219,7 +221,7 @@ open class PanModalPresentationController: UIPresentationController { override public func dismissalTransitionDidEnd(_ completed: Bool) { if !completed { return } - + presentable?.panModalDidDismiss() } @@ -303,7 +305,7 @@ public extension PanModalPresentationController { configureViewLayout() adjustPresentedViewFrame() observe(scrollView: presentable?.panScrollable) - configureScrollViewInsets() +// configureScrollViewInsets() } } @@ -370,7 +372,7 @@ private extension PanModalPresentationController { let adjustedSize = CGSize(width: frame.size.width, height: frame.size.height - anchoredYPosition) let panFrame = panContainerView.frame panContainerView.frame.size = frame.size - + if ![shortFormYPosition, longFormYPosition].contains(panFrame.origin.y) { // if the container is already in the correct position, no need to adjust positioning // (rotations & size changes cause positioning to be out of sync) @@ -429,6 +431,7 @@ private extension PanModalPresentationController { longFormYPosition = layoutPresentable.longFormYPos anchorModalToLongForm = layoutPresentable.anchorModalToLongForm extendsPanScrolling = layoutPresentable.allowsExtendedPanScrolling + scrollView = layoutPresentable.panScrollable containerView?.isUserInteractionEnabled = layoutPresentable.isUserInteractionEnabled } @@ -582,11 +585,27 @@ private extension PanModalPresentationController { if presentedView.frame.origin.y < longFormYPosition { yDisplacement /= 2.0 } + + var contentOffset = scrollView?.contentOffset ?? .zero adjust(toYPosition: presentedView.frame.origin.y + yDisplacement) + keyboardView(value: yDisplacement) panGestureRecognizer.setTranslation(.zero, in: presentedView) } + func keyboardView(value: CGFloat) { + let windows = UIApplication.shared.windows + + if let keyboardWindow = windows + .first(where: { NSStringFromClass($0.classForCoder) == "UIRemoteKeyboardWindow" }) { + + var frame = keyboardWindow.frame ?? .zero + frame.origin.y = max(value + frame.origin.y, .zero) + + keyboardWindow.frame = frame ?? .zero + } + } + /** Determines if we should fail the gesture recognizer based on certain conditions @@ -653,7 +672,7 @@ private extension PanModalPresentationController { */ func adjust(toYPosition yPos: CGFloat) { presentedView.frame.origin.y = max(yPos, anchoredYPosition) - + guard presentedView.frame.origin.y > shortFormYPosition else { backgroundView.dimState = .max return @@ -828,7 +847,7 @@ extension PanModalPresentationController: UIGestureRecognizerDelegate { is the pan scrollable view */ public func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldRecognizeSimultaneouslyWith otherGestureRecognizer: UIGestureRecognizer) -> Bool { - return otherGestureRecognizer.view == presentable?.panScrollable + return true//otherGestureRecognizer.view == presentable?.panScrollable } } diff --git a/PanModal/KeyboardPresentable/PanModalKeyboardPresentable+Defaults.swift b/PanModal/KeyboardPresentable/PanModalKeyboardPresentable+Defaults.swift new file mode 100644 index 00000000..60d770a5 --- /dev/null +++ b/PanModal/KeyboardPresentable/PanModalKeyboardPresentable+Defaults.swift @@ -0,0 +1,35 @@ +// +// PanModalKeyboardPresentable+Defaults.swift +// PanModal +// +// Created by Semen Kologrivov on 07.07.2022. +// + +import UIKit + +public extension PanModalKeyboardPresentable where Self: UIViewController { + + var extrasHeight: CGFloat { + .zero + } + + var minimumHeight: CGFloat { + .zero + } + + var contentWithKeyboardHeight: CGFloat { + let height = self.keyboardScrollView.contentSize.height + + (self.titleView?.frame.height ?? .zero) + + self.keyboardHeight + + self.extrasHeight + return max(height, self.minimumHeight) + } + + func updatePanModal() { + self.updatePanModal(toState: .longForm) + } + + func updatePanModal(toState state: PanModalPresentationController.PresentationState) { + (self.navigationController as? PanModalNavController)?.updatePanModal(toState: state) + } +} diff --git a/PanModal/KeyboardPresentable/PanModalKeyboardPresentable.swift b/PanModal/KeyboardPresentable/PanModalKeyboardPresentable.swift new file mode 100644 index 00000000..3c2b6625 --- /dev/null +++ b/PanModal/KeyboardPresentable/PanModalKeyboardPresentable.swift @@ -0,0 +1,27 @@ +// +// PanModalKeyboardPresentable.swift +// PanModal +// +// Created by Semen Kologrivov on 07.07.2022. +// + +import UIKit + +public protocol PanModalKeyboardPresentable: PanModalPresentable { + + var keyboardScrollView: UIScrollView { get } + var titleView: UIView? { get } + + var keyboardHeight: CGFloat { get } + var keyboardIsShown: Bool { get } + + var minimumHeight: CGFloat { get } + + var extrasHeight: CGFloat { get } + + var contentWithKeyboardHeight: CGFloat { get } + + func updatePanModal() + + func updatePanModal(toState state: PanModalPresentationController.PresentationState) +} diff --git a/PanModal/Presentable/PanModalPresentable+UIViewController.swift b/PanModal/Presentable/PanModalPresentable+UIViewController.swift index 8de82fd5..6343ccfc 100644 --- a/PanModal/Presentable/PanModalPresentable+UIViewController.swift +++ b/PanModal/Presentable/PanModalPresentable+UIViewController.swift @@ -59,5 +59,18 @@ public extension PanModalPresentable where Self: UIViewController { PanModalAnimator.animate(animationBlock, config: self, completion) } + func panModalPresentWithNavController(parentVC: UIViewController?) { + let navController = PanModalNavController(rootViewController: self) + parentVC?.presentPanModal(navController) + } + + func panModalPush(parentVC: UIViewController?) { + let navController = parentVC?.navigationController as? PanModalNavController + + DispatchQueue.main.async { + navController?.pushViewController(self, animated: false) + } + } + } #endif diff --git a/PanModal/View/DimmedView.swift b/PanModal/View/DimmedView.swift index 34e9fc36..6fdd1d8b 100644 --- a/PanModal/View/DimmedView.swift +++ b/PanModal/View/DimmedView.swift @@ -32,11 +32,11 @@ public class DimmedView: UIView { didSet { switch dimState { case .max: - alpha = 0.2 + alpha = 1.0 case .off: alpha = 0.0 case .percent(let percentage): - alpha = 0.2 + alpha = max(0.0, min(1.0, percentage)) } } } @@ -55,7 +55,7 @@ public class DimmedView: UIView { // MARK: - Initializers - init(dimColor: UIColor = UIColor.black.withAlphaComponent(0.2)) { + init(dimColor: UIColor = UIColor.black.withAlphaComponent(0.7)) { super.init(frame: .zero) alpha = 0.0 backgroundColor = dimColor From 1268d675b45d170a43ea5855d06b9e200df39927 Mon Sep 17 00:00:00 2001 From: Ivan Michaylovsky Date: Fri, 8 Jul 2022 14:54:50 +0700 Subject: [PATCH 08/13] custom move keyboard --- .../PanModalPresentationController.swift | 16 +++++++++++++--- .../PanModalPresentable+Defaults.swift | 4 ++++ PanModal/Presentable/PanModalPresentable.swift | 1 + 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/PanModal/Controller/PanModalPresentationController.swift b/PanModal/Controller/PanModalPresentationController.swift index 2ef9b650..32ca06fd 100644 --- a/PanModal/Controller/PanModalPresentationController.swift +++ b/PanModal/Controller/PanModalPresentationController.swift @@ -86,6 +86,8 @@ open class PanModalPresentationController: UIPresentationController { */ private var longFormYPosition: CGFloat = 0 + private var enableCustomInteractiveKeyboard: Bool = true + /** Determine anchored Y postion based on the `anchorModalToLongForm` flag */ @@ -305,7 +307,6 @@ public extension PanModalPresentationController { configureViewLayout() adjustPresentedViewFrame() observe(scrollView: presentable?.panScrollable) -// configureScrollViewInsets() } } @@ -432,6 +433,7 @@ private extension PanModalPresentationController { anchorModalToLongForm = layoutPresentable.anchorModalToLongForm extendsPanScrolling = layoutPresentable.allowsExtendedPanScrolling scrollView = layoutPresentable.panScrollable + enableCustomInteractiveKeyboard = layoutPresentable.enableCustomInteractiveKeyboard containerView?.isUserInteractionEnabled = layoutPresentable.isUserInteractionEnabled } @@ -588,12 +590,15 @@ private extension PanModalPresentationController { var contentOffset = scrollView?.contentOffset ?? .zero adjust(toYPosition: presentedView.frame.origin.y + yDisplacement) - keyboardView(value: yDisplacement) + + if enableCustomInteractiveKeyboard { + moveKeyboardView(displacement: yDisplacement) + } panGestureRecognizer.setTranslation(.zero, in: presentedView) } - func keyboardView(value: CGFloat) { + func moveKeyboardView(displacement: CGFloat) { let windows = UIApplication.shared.windows if let keyboardWindow = windows @@ -662,6 +667,11 @@ private extension PanModalPresentationController { PanModalAnimator.animate({ [weak self] in self?.adjust(toYPosition: yPos) self?.isPresentedViewAnimating = true + + if self?.enableCustomInteractiveKeyboard ?? false { + self?.moveKeyboardView(displacement: -.greatestFiniteMagnitude) + } + }, config: presentable) { [weak self] didComplete in self?.isPresentedViewAnimating = !didComplete } diff --git a/PanModal/Presentable/PanModalPresentable+Defaults.swift b/PanModal/Presentable/PanModalPresentable+Defaults.swift index 76a0679f..ee77ffba 100644 --- a/PanModal/Presentable/PanModalPresentable+Defaults.swift +++ b/PanModal/Presentable/PanModalPresentable+Defaults.swift @@ -64,6 +64,10 @@ public extension PanModalPresentable where Self: UIViewController { return true } + var enableCustomInteractiveKeyboard: Bool { + return true + } + var allowsExtendedPanScrolling: Bool { guard let scrollView = panScrollable diff --git a/PanModal/Presentable/PanModalPresentable.swift b/PanModal/Presentable/PanModalPresentable.swift index 76c15015..ac339c92 100644 --- a/PanModal/Presentable/PanModalPresentable.swift +++ b/PanModal/Presentable/PanModalPresentable.swift @@ -126,6 +126,7 @@ public protocol PanModalPresentable: AnyObject { */ var allowsExtendedPanScrolling: Bool { get } + var enableCustomInteractiveKeyboard: Bool { get } /** A flag to determine if dismissal should be initiated when swiping down on the presented view. From c5e36a368dd8cf84f5d2c321989c4a3817110ed4 Mon Sep 17 00:00:00 2001 From: Ivan Michaylovsky Date: Mon, 11 Jul 2022 10:55:52 +0700 Subject: [PATCH 09/13] fix: name property --- PanModal/Controller/PanModalPresentationController.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PanModal/Controller/PanModalPresentationController.swift b/PanModal/Controller/PanModalPresentationController.swift index 32ca06fd..5f889ec7 100644 --- a/PanModal/Controller/PanModalPresentationController.swift +++ b/PanModal/Controller/PanModalPresentationController.swift @@ -605,7 +605,7 @@ private extension PanModalPresentationController { .first(where: { NSStringFromClass($0.classForCoder) == "UIRemoteKeyboardWindow" }) { var frame = keyboardWindow.frame ?? .zero - frame.origin.y = max(value + frame.origin.y, .zero) + frame.origin.y = max(displacement + frame.origin.y, .zero) keyboardWindow.frame = frame ?? .zero } From 5910c632b46b174d3703cdecfb4aa7edb195c2cb Mon Sep 17 00:00:00 2001 From: Ivan Michaylovsky Date: Mon, 11 Jul 2022 17:01:34 +0700 Subject: [PATCH 10/13] feat: impl pan modal scroll view --- PanModal.xcodeproj/project.pbxproj | 65 ++++++++++++++++++------------ 1 file changed, 40 insertions(+), 25 deletions(-) diff --git a/PanModal.xcodeproj/project.pbxproj b/PanModal.xcodeproj/project.pbxproj index c64d46bd..a31f4962 100644 --- a/PanModal.xcodeproj/project.pbxproj +++ b/PanModal.xcodeproj/project.pbxproj @@ -3,17 +3,16 @@ archiveVersion = 1; classes = { }; - objectVersion = 55; + objectVersion = 50; objects = { /* Begin PBXBuildFile section */ + 0E391F2415A5726AC9E18186 /* PanModalKeyboardPresentable+Defaults.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82F2FF2E7898D35F82E277D6 /* PanModalKeyboardPresentable+Defaults.swift */; }; 1D34D9B02EB1AC010D28A788 /* PanModalHeight.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABF65B3D44F3AC87AC56675B /* PanModalHeight.swift */; }; 2D12137F8718A3970F14AFA1 /* PanModalAnimator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 247F269CB9E79F921797C868 /* PanModalAnimator.swift */; }; - 397E8D08287694BE00550BA3 /* PanModalKeyboardPresentable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 397E8D07287694BE00550BA3 /* PanModalKeyboardPresentable.swift */; }; - 397E8D0B2876956C00550BA3 /* PanModalKeyboardPresentable+Defaults.swift in Sources */ = {isa = PBXBuildFile; fileRef = 397E8D0A2876956C00550BA3 /* PanModalKeyboardPresentable+Defaults.swift */; }; - 397E8D0D2876962D00550BA3 /* PanModalNavigationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 397E8D0C2876962D00550BA3 /* PanModalNavigationController.swift */; }; 3FE4AC79C0FFC08A763B73CA /* PanModalPresenter.swift in Sources */ = {isa = PBXBuildFile; fileRef = B88988866B1E9B8041D8CDBC /* PanModalPresenter.swift */; }; 4ADB47FF2175663ADCA39476 /* PanModalPresentable.swift in Sources */ = {isa = PBXBuildFile; fileRef = CEF747134DCC92CD1E6B1A1C /* PanModalPresentable.swift */; }; + 564E41966241D7803EA68C20 /* PanModalKeyboardPresentable.swift in Sources */ = {isa = PBXBuildFile; fileRef = F99DE1EC61D2721C1D5BD49E /* PanModalKeyboardPresentable.swift */; }; 568E31FE1C634747DF96BF89 /* PanModalPresentationAnimator.swift in Sources */ = {isa = PBXBuildFile; fileRef = BE33C1773BA187DC156A1573 /* PanModalPresentationAnimator.swift */; }; 7F6A9D4296C19BBC01898E49 /* PanModalPresentable+Defaults.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3BE99A40E84171281F1D649 /* PanModalPresentable+Defaults.swift */; }; 847DF45F2EE236DC6632D86B /* PanContainerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6182FE3A8D6D219CE0CDCCCF /* PanContainerView.swift */; }; @@ -21,6 +20,7 @@ A7D3582C1ADA0E60361A9B30 /* UIViewController+PanModalPresenter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6E9105024A9438C1AC2D8D29 /* UIViewController+PanModalPresenter.swift */; }; B9E8259F773D27BAA416DCDB /* PanModalPresentationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D58F1F9245FCF277E33A16FE /* PanModalPresentationController.swift */; }; BD2A2F384AA6A669BB094AFE /* DimmedView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D9359135D025D85DF75DE4F5 /* DimmedView.swift */; }; + C5212562E96EB66723FA4AF5 /* PanModalNavigationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9BAE1B81D3CE5D181BF9FEC5 /* PanModalNavigationController.swift */; }; DF004916923A0853BE2A6EF3 /* PanModalPresentable+UIViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A6D777902F927D45E55BD58 /* PanModalPresentable+UIViewController.swift */; }; EB726BFFEE56C0BF9E060581 /* PanModalPresentationDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 666A2C96EA5A339D2BF1AFD7 /* PanModalPresentationDelegate.swift */; }; /* End PBXBuildFile section */ @@ -41,14 +41,13 @@ /* Begin PBXFileReference section */ 20E8316EBC147D20D0D4AFCC /* PanModal.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PanModal.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 247F269CB9E79F921797C868 /* PanModalAnimator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PanModalAnimator.swift; sourceTree = ""; }; - 397E8D07287694BE00550BA3 /* PanModalKeyboardPresentable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PanModalKeyboardPresentable.swift; sourceTree = ""; }; - 397E8D0A2876956C00550BA3 /* PanModalKeyboardPresentable+Defaults.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "PanModalKeyboardPresentable+Defaults.swift"; sourceTree = ""; }; - 397E8D0C2876962D00550BA3 /* PanModalNavigationController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PanModalNavigationController.swift; sourceTree = ""; }; 5D4E1B52C8DEB3611236C530 /* PanModal-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = "PanModal-Info.plist"; sourceTree = ""; }; 6182FE3A8D6D219CE0CDCCCF /* PanContainerView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PanContainerView.swift; sourceTree = ""; }; 666A2C96EA5A339D2BF1AFD7 /* PanModalPresentationDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PanModalPresentationDelegate.swift; sourceTree = ""; }; 6E9105024A9438C1AC2D8D29 /* UIViewController+PanModalPresenter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIViewController+PanModalPresenter.swift"; sourceTree = ""; }; + 82F2FF2E7898D35F82E277D6 /* PanModalKeyboardPresentable+Defaults.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "PanModalKeyboardPresentable+Defaults.swift"; sourceTree = ""; }; 9A6D777902F927D45E55BD58 /* PanModalPresentable+UIViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "PanModalPresentable+UIViewController.swift"; sourceTree = ""; }; + 9BAE1B81D3CE5D181BF9FEC5 /* PanModalNavigationController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PanModalNavigationController.swift; sourceTree = ""; }; ABF65B3D44F3AC87AC56675B /* PanModalHeight.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PanModalHeight.swift; sourceTree = ""; }; B3BE99A40E84171281F1D649 /* PanModalPresentable+Defaults.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "PanModalPresentable+Defaults.swift"; sourceTree = ""; }; B88988866B1E9B8041D8CDBC /* PanModalPresenter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PanModalPresenter.swift; sourceTree = ""; }; @@ -57,6 +56,7 @@ CEF747134DCC92CD1E6B1A1C /* PanModalPresentable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PanModalPresentable.swift; sourceTree = ""; }; D58F1F9245FCF277E33A16FE /* PanModalPresentationController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PanModalPresentationController.swift; sourceTree = ""; }; D9359135D025D85DF75DE4F5 /* DimmedView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DimmedView.swift; sourceTree = ""; }; + F99DE1EC61D2721C1D5BD49E /* PanModalKeyboardPresentable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PanModalKeyboardPresentable.swift; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -78,6 +78,15 @@ name = Products; sourceTree = ""; }; + 1EE8AF31D3AD6ADAE5A2F5B4 /* KeyboardPresentable */ = { + isa = PBXGroup; + children = ( + F99DE1EC61D2721C1D5BD49E /* PanModalKeyboardPresentable.swift */, + 82F2FF2E7898D35F82E277D6 /* PanModalKeyboardPresentable+Defaults.swift */, + ); + path = KeyboardPresentable; + sourceTree = ""; + }; 1FDDFE36812B21100970C573 = { isa = PBXGroup; children = ( @@ -103,15 +112,6 @@ name = Frameworks; sourceTree = ""; }; - 397E8D092876954A00550BA3 /* KeyboardPresentable */ = { - isa = PBXGroup; - children = ( - 397E8D07287694BE00550BA3 /* PanModalKeyboardPresentable.swift */, - 397E8D0A2876956C00550BA3 /* PanModalKeyboardPresentable+Defaults.swift */, - ); - path = KeyboardPresentable; - sourceTree = ""; - }; 50511DA5F1A1D1544D4692A1 /* InfoPlists */ = { isa = PBXGroup; children = ( @@ -153,8 +153,8 @@ 72C84C35A71A983A26D3CC70 /* Controller */ = { isa = PBXGroup; children = ( + 9BAE1B81D3CE5D181BF9FEC5 /* PanModalNavigationController.swift */, D58F1F9245FCF277E33A16FE /* PanModalPresentationController.swift */, - 397E8D0C2876962D00550BA3 /* PanModalNavigationController.swift */, ); path = Controller; sourceTree = ""; @@ -170,10 +170,10 @@ CBC53B798DC85A88A0F37788 /* PanModal */ = { isa = PBXGroup; children = ( - 397E8D092876954A00550BA3 /* KeyboardPresentable */, 26D371B632C7963B57350947 /* Animator */, 72C84C35A71A983A26D3CC70 /* Controller */, C5E5E974319C26486287CE0D /* Delegate */, + 1EE8AF31D3AD6ADAE5A2F5B4 /* KeyboardPresentable */, 5741396B55D075D098E40E92 /* Presentable */, 5B2E705D3A9A0381ED241E6A /* Presenter */, 6230FC53F41790705FFE9704 /* View */, @@ -226,6 +226,8 @@ isa = PBXProject; attributes = { LastUpgradeCheck = 9999; + TargetAttributes = { + }; }; buildConfigurationList = CCC9A83A9BFD2A0A523DC090 /* Build configuration list for PBXProject "PanModal" */; compatibilityVersion = "Xcode 13.0"; @@ -261,12 +263,12 @@ buildActionMask = 2147483647; files = ( 2D12137F8718A3970F14AFA1 /* PanModalAnimator.swift in Sources */, - 397E8D0D2876962D00550BA3 /* PanModalNavigationController.swift in Sources */, 568E31FE1C634747DF96BF89 /* PanModalPresentationAnimator.swift in Sources */, - 397E8D0B2876956C00550BA3 /* PanModalKeyboardPresentable+Defaults.swift in Sources */, + C5212562E96EB66723FA4AF5 /* PanModalNavigationController.swift in Sources */, B9E8259F773D27BAA416DCDB /* PanModalPresentationController.swift in Sources */, EB726BFFEE56C0BF9E060581 /* PanModalPresentationDelegate.swift in Sources */, - 397E8D08287694BE00550BA3 /* PanModalKeyboardPresentable.swift in Sources */, + 0E391F2415A5726AC9E18186 /* PanModalKeyboardPresentable+Defaults.swift in Sources */, + 564E41966241D7803EA68C20 /* PanModalKeyboardPresentable.swift in Sources */, 1D34D9B02EB1AC010D28A788 /* PanModalHeight.swift in Sources */, 7F6A9D4296C19BBC01898E49 /* PanModalPresentable+Defaults.swift in Sources */, A5E91380A4091F2092B662CE /* PanModalPresentable+LayoutHelpers.swift in Sources */, @@ -537,7 +539,10 @@ SDKROOT = iphoneos; SKIP_INSTALL = YES; SUPPORTS_MACCATALYST = NO; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) SWIFT_PACKAGE"; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = ( + "$(inherited)", + SWIFT_PACKAGE, + ); SWIFT_COMPILATION_MODE = wholemodule; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; SWIFT_SUPPRESS_WARNINGS = YES; @@ -585,7 +590,10 @@ SDKROOT = iphoneos; SKIP_INSTALL = YES; SUPPORTS_MACCATALYST = NO; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) SWIFT_PACKAGE"; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = ( + "$(inherited)", + SWIFT_PACKAGE, + ); SWIFT_COMPILATION_MODE = wholemodule; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; SWIFT_SUPPRESS_WARNINGS = YES; @@ -633,7 +641,10 @@ SDKROOT = iphoneos; SKIP_INSTALL = YES; SUPPORTS_MACCATALYST = NO; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) SWIFT_PACKAGE"; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = ( + "$(inherited)", + SWIFT_PACKAGE, + ); SWIFT_COMPILATION_MODE = wholemodule; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; SWIFT_SUPPRESS_WARNINGS = YES; @@ -681,7 +692,11 @@ SDKROOT = iphoneos; SKIP_INSTALL = YES; SUPPORTS_MACCATALYST = NO; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) DEBUG SWIFT_PACKAGE"; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = ( + "$(inherited)", + DEBUG, + SWIFT_PACKAGE, + ); SWIFT_COMPILATION_MODE = singlefile; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_SUPPRESS_WARNINGS = YES; From 2f4cb6b770e3cf8e9d78e0d7f1d55c3b7a69759c Mon Sep 17 00:00:00 2001 From: Semen Kologrivov Date: Thu, 14 Jul 2022 16:34:39 +0700 Subject: [PATCH 11/13] feat: Add new properties --- ...PanModalKeyboardPresentable+Defaults.swift | 14 +++++-------- .../PanModalKeyboardPresentable.swift | 13 +++--------- .../PanModalPresentable+Defaults.swift | 21 +++++++++++++++++++ .../Presentable/PanModalPresentable.swift | 6 ++++++ 4 files changed, 35 insertions(+), 19 deletions(-) diff --git a/PanModal/KeyboardPresentable/PanModalKeyboardPresentable+Defaults.swift b/PanModal/KeyboardPresentable/PanModalKeyboardPresentable+Defaults.swift index 60d770a5..d08a8fd4 100644 --- a/PanModal/KeyboardPresentable/PanModalKeyboardPresentable+Defaults.swift +++ b/PanModal/KeyboardPresentable/PanModalKeyboardPresentable+Defaults.swift @@ -17,19 +17,15 @@ public extension PanModalKeyboardPresentable where Self: UIViewController { .zero } + var keyboardScrollView: UIScrollView? { + self.panScrollable + } + var contentWithKeyboardHeight: CGFloat { - let height = self.keyboardScrollView.contentSize.height + + let height = (self.keyboardScrollView?.contentSize.height ?? .zero) + (self.titleView?.frame.height ?? .zero) + self.keyboardHeight + self.extrasHeight return max(height, self.minimumHeight) } - - func updatePanModal() { - self.updatePanModal(toState: .longForm) - } - - func updatePanModal(toState state: PanModalPresentationController.PresentationState) { - (self.navigationController as? PanModalNavController)?.updatePanModal(toState: state) - } } diff --git a/PanModal/KeyboardPresentable/PanModalKeyboardPresentable.swift b/PanModal/KeyboardPresentable/PanModalKeyboardPresentable.swift index 3c2b6625..897a076e 100644 --- a/PanModal/KeyboardPresentable/PanModalKeyboardPresentable.swift +++ b/PanModal/KeyboardPresentable/PanModalKeyboardPresentable.swift @@ -9,19 +9,12 @@ import UIKit public protocol PanModalKeyboardPresentable: PanModalPresentable { - var keyboardScrollView: UIScrollView { get } - var titleView: UIView? { get } - - var keyboardHeight: CGFloat { get } var keyboardIsShown: Bool { get } var minimumHeight: CGFloat { get } - + var keyboardHeight: CGFloat { get } var extrasHeight: CGFloat { get } - var contentWithKeyboardHeight: CGFloat { get } - - func updatePanModal() - - func updatePanModal(toState state: PanModalPresentationController.PresentationState) + + var keyboardScrollView: UIScrollView? { get } } diff --git a/PanModal/Presentable/PanModalPresentable+Defaults.swift b/PanModal/Presentable/PanModalPresentable+Defaults.swift index ee77ffba..11163896 100644 --- a/PanModal/Presentable/PanModalPresentable+Defaults.swift +++ b/PanModal/Presentable/PanModalPresentable+Defaults.swift @@ -128,5 +128,26 @@ public extension PanModalPresentable where Self: UIViewController { func panModalDidDismiss() { } + + var titleView: UIView? { + nil + } + + func updatePanModal() { + self.updatePanModal(toState: .longForm) + } + + func updatePanModal(toState state: PanModalPresentationController.PresentationState) { + guard let panNavigation = self.navigationController as? PanModalNavController else { + let inset = self.panScrollable?.contentInset ?? .zero + + self.panModalSetNeedsLayoutUpdate() + self.panModalTransition(to: state) + + self.panScrollable?.contentInset = inset + return + } + panNavigation.updatePanModal(toState: state) + } } #endif diff --git a/PanModal/Presentable/PanModalPresentable.swift b/PanModal/Presentable/PanModalPresentable.swift index ac339c92..55f61e4b 100644 --- a/PanModal/Presentable/PanModalPresentable.swift +++ b/PanModal/Presentable/PanModalPresentable.swift @@ -234,5 +234,11 @@ public protocol PanModalPresentable: AnyObject { Default value is an empty implementation. */ func panModalDidDismiss() + + var titleView: UIView? { get } + + func updatePanModal() + + func updatePanModal(toState state: PanModalPresentationController.PresentationState) } #endif From df357a3bb63921cef4a602d8671b301f10d40e2a Mon Sep 17 00:00:00 2001 From: Aleksandr Rudikov Date: Thu, 28 Jul 2022 14:19:43 +0700 Subject: [PATCH 12/13] fix: fix PanModalNavigationController longFormHeight, fix panModalPush --- PanModal/Controller/PanModalNavigationController.swift | 2 +- .../Presentable/PanModalPresentable+UIViewController.swift | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/PanModal/Controller/PanModalNavigationController.swift b/PanModal/Controller/PanModalNavigationController.swift index a4f2fa4e..41b6335b 100644 --- a/PanModal/Controller/PanModalNavigationController.swift +++ b/PanModal/Controller/PanModalNavigationController.swift @@ -39,7 +39,7 @@ open class PanModalNavController: UINavigationController, PanModalPresentable { open var longFormHeight: PanModalHeight { guard let panScrollable = self.presentViewController as? PanModalKeyboardPresentable else { - return .contentHeight(.zero) + return self.presentViewController.longFormHeight } let height = panScrollable.contentWithKeyboardHeight diff --git a/PanModal/Presentable/PanModalPresentable+UIViewController.swift b/PanModal/Presentable/PanModalPresentable+UIViewController.swift index 6343ccfc..075c4ea5 100644 --- a/PanModal/Presentable/PanModalPresentable+UIViewController.swift +++ b/PanModal/Presentable/PanModalPresentable+UIViewController.swift @@ -64,11 +64,11 @@ public extension PanModalPresentable where Self: UIViewController { parentVC?.presentPanModal(navController) } - func panModalPush(parentVC: UIViewController?) { + func panModalPush(parentVC: UIViewController?, animated: Bool = false) { let navController = parentVC?.navigationController as? PanModalNavController DispatchQueue.main.async { - navController?.pushViewController(self, animated: false) + navController?.pushViewController(self, animated: animated) } } From d274359ac0218b62cf8b76e28af5f0bb226f1b77 Mon Sep 17 00:00:00 2001 From: Aleksandr Rudikov Date: Mon, 8 Aug 2022 17:57:22 +0700 Subject: [PATCH 13/13] fix: fix inputAccessoryView frame when keyboard is moving --- .../Controller/PanModalPresentationController.swift | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/PanModal/Controller/PanModalPresentationController.swift b/PanModal/Controller/PanModalPresentationController.swift index 5f889ec7..c986e796 100644 --- a/PanModal/Controller/PanModalPresentationController.swift +++ b/PanModal/Controller/PanModalPresentationController.swift @@ -608,6 +608,17 @@ private extension PanModalPresentationController { frame.origin.y = max(displacement + frame.origin.y, .zero) keyboardWindow.frame = frame ?? .zero + + let accessoryView = windows + .first(where: { NSStringFromClass($0.classForCoder) == "UITextEffectsWindow" }) + + var accessoryFrame = accessoryView?.frame ?? .zero + accessoryFrame.origin.y = max( + displacement + (accessoryFrame.origin.y ?? .zero), + .zero + ) + + accessoryView?.frame = accessoryFrame ?? .zero } }