Skip to content
This repository has been archived by the owner on Jun 17, 2018. It is now read-only.

Commit

Permalink
Trigger didScrollEnd in scrollViewDidEndDecelerating(_:)
Browse files Browse the repository at this point in the history
  • Loading branch information
kitasuke committed Jan 9, 2017
1 parent 08e97d7 commit 0759c5e
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions Pod/Classes/PagingMenuController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,8 @@ open class PagingMenuController: UIViewController {

extension PagingMenuController: UIScrollViewDelegate {
public func scrollViewDidEndDecelerating(_ scrollView: UIScrollView) {
onMove?(.didScrollEnd)

let nextPage: Int
switch (scrollView, pagingViewController, menuView) {
case let (scrollView, pagingViewController?, _) where scrollView.isEqual(pagingViewController.contentScrollView):
Expand All @@ -327,11 +329,7 @@ extension PagingMenuController: UIScrollViewDelegate {
public func scrollViewWillBeginDragging(_ scrollView: UIScrollView) {
onMove?(.didScrollStart)
}

public func scrollViewDidEndDecelerating(_ scrollView: UIScrollView, willDecelerate decelerate: Bool) {
onMove?(.didScrollEnd)
}


public func scrollViewDidEndDragging(_ scrollView: UIScrollView, willDecelerate decelerate: Bool) {
switch (scrollView, decelerate) {
case (let scrollView, false) where scrollView.isEqual(menuView): break
Expand Down

0 comments on commit 0759c5e

Please sign in to comment.