Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
kahayash authored and kahayash committed Jul 6, 2017
1 parent f5c3b01 commit cee01a6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions PagingKit/PagingMenuViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -130,14 +130,14 @@ public class PagingMenuViewController: UIViewController {
return collectionView.dequeueReusableCell(withReuseIdentifier: identifier, for: IndexPath(item: index, section: 0))
}

public func reloadDate(startingOn index: Int? = nil) {
public func reloadDate(startingOn index: Int? = nil, completionHandler: ((Bool) -> Void)? = nil) {
collectionView.reloadData()

if let index = index {
collectionView.performBatchUpdates(nil) { [weak self] (_) in
collectionView.performBatchUpdates(nil) { [weak self] (finish) in
guard let _self = self else { return }
_self.scroll(index: index, percent: 0, animated: false)
_self.scrollDelegate?.menuViewController(viewController: _self, focusViewDidEndTransition: _self.focusView)
completionHandler?(finish)
}
}
}
Expand Down

0 comments on commit cee01a6

Please sign in to comment.