Skip to content

Instantly share code, notes, and snippets.

@thomasdegry
Created April 22, 2015 21:59
Show Gist options
  • Save thomasdegry/6f50bdc652b79ab6085a to your computer and use it in GitHub Desktop.
Save thomasdegry/6f50bdc652b79ab6085a to your computer and use it in GitHub Desktop.
#if 0
[cv performBatchUpdates:^{
if (components.month < 0) {
[cv deleteSections:[NSIndexSet indexSetWithIndexesInRange:(NSRange){
cv.numberOfSections - abs(components.month),
abs(components.month)
}]];
[cv insertSections:[NSIndexSet indexSetWithIndexesInRange:(NSRange){
0,
abs(components.month)
}]];
} else {
[cv insertSections:[NSIndexSet indexSetWithIndexesInRange:(NSRange){
cv.numberOfSections,
abs(components.month)
}]];
[cv deleteSections:[NSIndexSet indexSetWithIndexesInRange:(NSRange){
0,
abs(components.month)
}]];
}
} completion:^(BOOL finished) {
NSLog(@"%s %x", __PRETTY_FUNCTION__, finished);
}];
for (UIView *view in cv.subviews)
[view.layer removeAllAnimations];
#else
[cv reloadData];
[cvLayout invalidateLayout];
[cvLayout prepareLayout];
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment