Fix issue for selection state

This commit is contained in:
WenchaoD 2017-05-05 12:24:26 +08:00
parent a144e79a62
commit 0a88f0a1e4
1 changed files with 6 additions and 0 deletions

View File

@ -1550,6 +1550,12 @@ void FSCalendarRunLoopCallback(CFRunLoopObserverRef observer, CFRunLoopActivity
break;
}
}
// Synchronize selecion state to the collection view, otherwise delegate methods would not be triggered.
if (cell.selected) {
[self.collectionView selectItemAtIndexPath:indexPath animated:NO scrollPosition:NO];
} else {
[self.collectionView deselectItemAtIndexPath:indexPath animated:NO];
}
[self invalidateAppearanceForCell:cell forDate:date];
[cell configureAppearance];