Skip to content

Commit

Permalink
fix resetting selection
Browse files Browse the repository at this point in the history
  • Loading branch information
Hyun-je committed Jul 1, 2018
1 parent 8ec6e37 commit b3160e1
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -193,13 +193,13 @@ extension HJCalendarView: UICollectionViewDelegateFlowLayout {
let dateComponents = HJCalendar.calendar.dateComponents([.year, .month], from: calendarArray[1].date)
calendarDelegate?.didChangeCalendar(self, dateComponents: dateComponents)

let indexPath = IndexPath(row: 0, section: 1)
scrollToItem(at: indexPath, at: UICollectionViewScrollPosition.left, animated: false)

self.reloadData()

}

let indexPath = IndexPath(row: 0, section: 1)
scrollToItem(at: indexPath, at: UICollectionViewScrollPosition.left, animated: false)

self.reloadData()

}


Expand Down
10 changes: 5 additions & 5 deletions HJCalendarView/HJCalendarView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -193,13 +193,13 @@ extension HJCalendarView: UICollectionViewDelegateFlowLayout {
let dateComponents = HJCalendar.calendar.dateComponents([.year, .month], from: calendarArray[1].date)
calendarDelegate?.didChangeCalendar(self, dateComponents: dateComponents)

let indexPath = IndexPath(row: 0, section: 1)
scrollToItem(at: indexPath, at: UICollectionViewScrollPosition.left, animated: false)

self.reloadData()

}

let indexPath = IndexPath(row: 0, section: 1)
scrollToItem(at: indexPath, at: UICollectionViewScrollPosition.left, animated: false)

self.reloadData()

}


Expand Down

0 comments on commit b3160e1

Please sign in to comment.