Skip to content

Commit

Permalink
Merge branch 'master' into iss-469
Browse files Browse the repository at this point in the history
  • Loading branch information
scenee committed Jan 14, 2023
2 parents 556eb57 + cd0948a commit 9d9f02b
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 14 deletions.
19 changes: 15 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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:
Expand All @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion FloatingPanel.podspec
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
16 changes: 15 additions & 1 deletion Sources/BackdropView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
}
4 changes: 2 additions & 2 deletions Sources/Controller.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 3 additions & 5 deletions Sources/Core.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion Sources/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>2.5.4</string>
<string>2.5.5</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
</dict>
Expand Down

0 comments on commit 9d9f02b

Please sign in to comment.