Created
April 22, 2015 21:59
-
-
Save thomasdegry/6f50bdc652b79ab6085a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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