Skip to content

Commit

Permalink
fix api typo (#325)
Browse files Browse the repository at this point in the history
fixes floatingPanel(_ vc: FloatingPanelController, contentOffsetForPinning) name
  • Loading branch information
zntfdr authored Feb 29, 2020
1 parent 7531d80 commit 8c24aa3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Examples/Samples/Sources/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ extension SampleListViewController: UITableViewDelegate {
}

extension SampleListViewController: FloatingPanelControllerDelegate {
func foatingPanel(_ vc: FloatingPanelController, contentOffsetForPinning trackedScrollView: UIScrollView) -> CGPoint {
func floatingPanel(_ vc: FloatingPanelController, contentOffsetForPinning trackedScrollView: UIScrollView) -> CGPoint {
if currentMenu == .showNavigationController, #available(iOSApplicationExtension 11.0, *) {
// 148.0 is the SafeArea's top value for a navigation bar with a large title.
return CGPoint(x: 0.0, y: 0.0 - trackedScrollView.contentInset.top - 148.0)
Expand Down
4 changes: 2 additions & 2 deletions Framework/Sources/FloatingPanelController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public protocol FloatingPanelControllerDelegate: class {
/// title, for example.
///
/// This method will not be called if the controller doesn't track any scroll view.
func foatingPanel(_ vc: FloatingPanelController, contentOffsetForPinning trackedScrollView: UIScrollView) -> CGPoint
func floatingPanel(_ vc: FloatingPanelController, contentOffsetForPinning trackedScrollView: UIScrollView) -> CGPoint
}

public extension FloatingPanelControllerDelegate {
Expand All @@ -71,7 +71,7 @@ public extension FloatingPanelControllerDelegate {
func floatingPanel(_ vc: FloatingPanelController, shouldRecognizeSimultaneouslyWith gestureRecognizer: UIGestureRecognizer) -> Bool {
return false
}
func foatingPanel(_ vc: FloatingPanelController, contentOffsetForPinning trackedScrollView: UIScrollView) -> CGPoint {
func floatingPanel(_ vc: FloatingPanelController, contentOffsetForPinning trackedScrollView: UIScrollView) -> CGPoint {
return CGPoint(x: 0.0, y: 0.0 - trackedScrollView.contentInset.top)
}
}
Expand Down
2 changes: 1 addition & 1 deletion Framework/Sources/FloatingPanelCore.swift
Original file line number Diff line number Diff line change
Expand Up @@ -905,7 +905,7 @@ class FloatingPanelCore: NSObject, UIGestureRecognizerDelegate {
}

private func contentOrigin(of scrollView: UIScrollView) -> CGPoint {
if let vc = viewcontroller, let origin = vc.delegate?.foatingPanel(vc, contentOffsetForPinning: scrollView) {
if let vc = viewcontroller, let origin = vc.delegate?.floatingPanel(vc, contentOffsetForPinning: scrollView) {
return origin
}
return CGPoint(x: 0.0, y: 0.0 - scrollView.contentInset.top)
Expand Down

0 comments on commit 8c24aa3

Please sign in to comment.