diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index d29ea13b..03ba4b58 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -17,6 +17,9 @@ jobs:
fail-fast: false
matrix:
include:
+ - swift: "5.7"
+ xcode: "14.1"
+ runsOn: macos-12
- swift: "5.6"
xcode: "13.3.1"
runsOn: macos-12
@@ -48,6 +51,10 @@ jobs:
fail-fast: false
matrix:
include:
+ - os: "16.1"
+ xcode: "14.1"
+ sim: "iPhone 14 Pro"
+ runsOn: macos-12
- os: "15.4"
xcode: "13.3.1"
sim: "iPhone 13 Pro"
@@ -76,7 +83,7 @@ jobs:
example:
runs-on: macos-12
env:
- DEVELOPER_DIR: /Applications/Xcode_13.3.1.app/Contents/Developer
+ DEVELOPER_DIR: /Applications/Xcode_14.1.app/Contents/Developer
strategy:
fail-fast: false
matrix:
@@ -92,13 +99,17 @@ jobs:
swiftpm:
runs-on: macos-12
env:
- DEVELOPER_DIR: /Applications/Xcode_13.3.1.app/Contents/Developer
+ DEVELOPER_DIR: /Applications/Xcode_14.1.app/Contents/Developer
strategy:
fail-fast: false
matrix:
include:
- - target: "arm64-apple-ios15.4-simulator"
- - target: "x86_64-apple-ios15.4-simulator"
+ # 15.7
+ - target: "x86_64-apple-ios15.7-simulator"
+ - target: "arm64-apple-ios15.7-simulator"
+ # 16.1
+ - target: "x86_64-apple-ios16.1-simulator"
+ - target: "arm64-apple-ios16.1-simulator"
steps:
- uses: actions/checkout@v2
- name: "Swift Package Manager build"
diff --git a/FloatingPanel.podspec b/FloatingPanel.podspec
index 12f3d1d7..bb7390f6 100644
--- a/FloatingPanel.podspec
+++ b/FloatingPanel.podspec
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|
s.name = "FloatingPanel"
- s.version = "2.5.4"
+ s.version = "2.5.5"
s.summary = "FloatingPanel is a clean and easy-to-use UI component of a floating panel interface."
s.description = <<-DESC
FloatingPanel is a clean and easy-to-use UI component for a new interface introduced in Apple Maps, Shortcuts and Stocks app.
diff --git a/Sources/BackdropView.swift b/Sources/BackdropView.swift
index 21cfc19a..9be1374a 100644
--- a/Sources/BackdropView.swift
+++ b/Sources/BackdropView.swift
@@ -7,5 +7,19 @@ import UIKit
public class BackdropView: UIView {
/// The gesture recognizer for tap gestures to dismiss a panel.
- @objc public var dismissalTapGestureRecognizer: UITapGestureRecognizer!
+ ///
+ /// By default, this gesture recognizer is disabled as following the default behavior of iOS modalities.
+ /// To dismiss a panel by tap gestures on the backrdop, `dismissalTapGestureRecognizer.isEanbled` is set to true.
+ @objc public var dismissalTapGestureRecognizer: UITapGestureRecognizer
+
+ init() {
+ dismissalTapGestureRecognizer = UITapGestureRecognizer()
+ dismissalTapGestureRecognizer.isEnabled = false
+ super.init(frame: .zero)
+ addGestureRecognizer(dismissalTapGestureRecognizer)
+ }
+
+ required init?(coder: NSCoder) {
+ fatalError("init(coder:) has not been implemented")
+ }
}
diff --git a/Sources/Controller.swift b/Sources/Controller.swift
index 4d41d99c..9c8db0f5 100644
--- a/Sources/Controller.swift
+++ b/Sources/Controller.swift
@@ -37,9 +37,9 @@ import UIKit
@objc optional
func floatingPanelShouldBeginDragging(_ fpc: FloatingPanelController) -> Bool
- /// Called when the user drags the surface or the surface is attracted to a state anchor.
+ /// Called while the user drags the surface or the surface moves to a state anchor.
@objc optional
- func floatingPanelDidMove(_ fpc: FloatingPanelController) // any surface frame changes in dragging
+ func floatingPanelDidMove(_ fpc: FloatingPanelController)
/// Called on start of dragging (may require some time and or distance to move)
@objc optional
diff --git a/Sources/Core.swift b/Sources/Core.swift
index d4befbfe..a452221f 100644
--- a/Sources/Core.swift
+++ b/Sources/Core.swift
@@ -96,11 +96,9 @@ class Core: NSObject, UIGestureRecognizerDelegate {
panGestureRecognizer.addTarget(self, action: #selector(handle(panGesture:)))
panGestureRecognizer.delegate = self
- // Set tap-to-dismiss in the backdrop view
- let tapGesture = UITapGestureRecognizer(target: self, action: #selector(handleBackdrop(tapGesture:)))
- tapGesture.isEnabled = false
- backdropView.dismissalTapGestureRecognizer = tapGesture
- backdropView.addGestureRecognizer(tapGesture)
+ // Set the tap-to-dismiss action of the backdrop view.
+ // It's disabled by default. See also BackdropView.dismissalTapGestureRecognizer.
+ backdropView.dismissalTapGestureRecognizer.addTarget(self, action: #selector(handleBackdrop(tapGesture:)))
}
deinit {
diff --git a/Sources/Info.plist b/Sources/Info.plist
index d04aed99..79134e2c 100644
--- a/Sources/Info.plist
+++ b/Sources/Info.plist
@@ -15,7 +15,7 @@
CFBundlePackageType
FMWK
CFBundleShortVersionString
- 2.5.4
+ 2.5.5
CFBundleVersion
$(CURRENT_PROJECT_VERSION)