Skip to content

Commit

Permalink
Merge pull request #106 from fiftie/feature/didselect_not_working
Browse files Browse the repository at this point in the history
Not working didSelect after the second time
  • Loading branch information
kazuhiro4949 authored Dec 15, 2019
2 parents 3c7bb64 + cc78a70 commit fbbb0fb
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions PagingKit/PagingMenuViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -327,9 +327,8 @@ extension PagingMenuViewController: PagingMenuViewDelegate {
}

public func pagingMenuView(pagingMenuView: PagingMenuView, didSelectItemAt index: Int) {
guard menuView.focusView.selectedIndex != index else { return }

delegate?.menuViewController(viewController: self, didSelect: index, previousPage: menuView.focusView.selectedIndex ?? 0)
guard menuView.focusView.selectedIndex != index else { return }
menuView.scroll(index: index) { [weak self] (finish) in
guard let _self = self, finish else { return }
_self.delegate?.menuViewController(viewController: _self, focusViewDidEndTransition: _self.menuView.focusView)
Expand Down

0 comments on commit fbbb0fb

Please sign in to comment.