Skip to content

Commit

Permalink
Added onPositionChange
Browse files Browse the repository at this point in the history
  • Loading branch information
pedrommcarrasco committed Aug 6, 2019
1 parent 10921bf commit d673a7f
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 7 deletions.
4 changes: 2 additions & 2 deletions Example/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PODS:
- Hover (1.2.0)
- Hover (1.3.0)

DEPENDENCIES:
- Hover (from `..`)
Expand All @@ -9,7 +9,7 @@ EXTERNAL SOURCES:
:path: ".."

SPEC CHECKSUMS:
Hover: 4d6d452c3f903162730289058e316319e1213566
Hover: 002ceb90624ed4817ddf2021700b9ff33e374002

PODFILE CHECKSUM: 4464a752690793fe72e3febd146ffc7ffb897004

Expand Down
4 changes: 2 additions & 2 deletions Example/Pods/Local Podspecs/Hover.podspec.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Example/Pods/Manifest.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Hover.podspec
Original file line number Diff line number Diff line change
@@ -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' }
Expand Down
4 changes: 4 additions & 0 deletions Hover/UI/HoverView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ public class HoverView: UIView {
}
}

public var onPositionChange: ((HoverPosition) -> ())?

// MARK: Private Properties
private let anchors: [Anchor]
private let configuration: HoverConfiguration
Expand All @@ -90,6 +92,8 @@ public class HoverView: UIView {
} else {
adapt(to: currentAnchor)
}

onPositionChange?(currentAnchor.position)
}
}

Expand Down

0 comments on commit d673a7f

Please sign in to comment.