diff --git a/Example/Podfile.lock b/Example/Podfile.lock index 0b013b3..e486f7a 100644 --- a/Example/Podfile.lock +++ b/Example/Podfile.lock @@ -1,5 +1,5 @@ PODS: - - Hover (1.2.0) + - Hover (1.3.0) DEPENDENCIES: - Hover (from `..`) @@ -9,7 +9,7 @@ EXTERNAL SOURCES: :path: ".." SPEC CHECKSUMS: - Hover: 4d6d452c3f903162730289058e316319e1213566 + Hover: 002ceb90624ed4817ddf2021700b9ff33e374002 PODFILE CHECKSUM: 4464a752690793fe72e3febd146ffc7ffb897004 diff --git a/Example/Pods/Local Podspecs/Hover.podspec.json b/Example/Pods/Local Podspecs/Hover.podspec.json index 6d6e6b7..c0d25b8 100644 --- a/Example/Pods/Local Podspecs/Hover.podspec.json +++ b/Example/Pods/Local Podspecs/Hover.podspec.json @@ -1,6 +1,6 @@ { "name": "Hover", - "version": "1.2.0", + "version": "1.3.0", "license": { "type": "MIT", "file": "LICENSE" @@ -13,7 +13,7 @@ "description": "Hover is a draggable floating action button (FAB) inspired by Apple's session Designing Fluid Interfaces & Nathan Gitter's fluid-interfaces. Hover will always stick to the nearest corner to avoid blocking content and allows the user to send it to any other corner with a single swipe.", "source": { "git": "https://github.com/pedrommcarrasco/Hover.git", - "tag": "1.2.0" + "tag": "1.3.0" }, "swift_versions": "5.0", "platforms": { diff --git a/Example/Pods/Manifest.lock b/Example/Pods/Manifest.lock index 0b013b3..e486f7a 100644 --- a/Example/Pods/Manifest.lock +++ b/Example/Pods/Manifest.lock @@ -1,5 +1,5 @@ PODS: - - Hover (1.2.0) + - Hover (1.3.0) DEPENDENCIES: - Hover (from `..`) @@ -9,7 +9,7 @@ EXTERNAL SOURCES: :path: ".." SPEC CHECKSUMS: - Hover: 4d6d452c3f903162730289058e316319e1213566 + Hover: 002ceb90624ed4817ddf2021700b9ff33e374002 PODFILE CHECKSUM: 4464a752690793fe72e3febd146ffc7ffb897004 diff --git a/Hover.podspec b/Hover.podspec index 9b49270..98567b0 100644 --- a/Hover.podspec +++ b/Hover.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |spec| spec.name = 'Hover' - spec.version = '1.2.0' + spec.version = '1.3.0' spec.license = { :type => 'MIT', :file => 'LICENSE' } spec.homepage = 'https://github.com/pedrommcarrasco/Hover' spec.authors = { 'Pedro Carrasco' => 'https://twitter.com/pedrommcarrasco' } diff --git a/Hover/UI/HoverView.swift b/Hover/UI/HoverView.swift index 57115c0..254dcde 100644 --- a/Hover/UI/HoverView.swift +++ b/Hover/UI/HoverView.swift @@ -76,6 +76,8 @@ public class HoverView: UIView { } } + public var onPositionChange: ((HoverPosition) -> ())? + // MARK: Private Properties private let anchors: [Anchor] private let configuration: HoverConfiguration @@ -90,6 +92,8 @@ public class HoverView: UIView { } else { adapt(to: currentAnchor) } + + onPositionChange?(currentAnchor.position) } }