diff --git a/AsyncDisplayKit/ASTableView.mm b/AsyncDisplayKit/ASTableView.mm index d771cc7960..de524c3574 100644 --- a/AsyncDisplayKit/ASTableView.mm +++ b/AsyncDisplayKit/ASTableView.mm @@ -100,7 +100,7 @@ static BOOL _isInterceptedSelector(SEL sel) #pragma mark - -#pragma mark ASTableView. +#pragma mark ASTableView @interface ASTableView () { _ASTableViewProxy *_proxyDataSource; @@ -117,7 +117,7 @@ static BOOL _isInterceptedSelector(SEL sel) @implementation ASTableView #pragma mark - -#pragma mark Lifecycle. +#pragma mark Lifecycle - (instancetype)initWithFrame:(CGRect)frame style:(UITableViewStyle)style { @@ -141,7 +141,7 @@ static BOOL _isInterceptedSelector(SEL sel) } #pragma mark - -#pragma mark Overrides. +#pragma mark Overrides - (void)setDataSource:(id)dataSource { @@ -216,7 +216,9 @@ static BOOL _isInterceptedSelector(SEL sel) return visibleNodes; } -#pragma mark Assertions. + +#pragma mark - +#pragma mark Assertions - (void)throwUnimplementedException { @@ -235,6 +237,10 @@ static BOOL _isInterceptedSelector(SEL sel) [self throwUnimplementedException]; } + +#pragma mark - +#pragma mark Editing + - (void)insertSections:(NSIndexSet *)sections withRowAnimation:(UITableViewRowAnimation)animation { [_dataController insertSections:sections withAnimationOption:animation]; @@ -276,7 +282,7 @@ static BOOL _isInterceptedSelector(SEL sel) } #pragma mark - -#pragma mark Intercepted selectors. +#pragma mark Intercepted selectors - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { @@ -353,14 +359,16 @@ static BOOL _isInterceptedSelector(SEL sel) #pragma mark - -#pragma mark ASRangeControllerDelegate. +#pragma mark ASRangeControllerDelegate -- (void)rangeControllerBeginUpdates:(ASRangeController *)rangeController { +- (void)rangeControllerBeginUpdates:(ASRangeController *)rangeController +{ ASDisplayNodeAssertMainThread(); [super beginUpdates]; } -- (void)rangeControllerEndUpdates:(ASRangeController *)rangeController { +- (void)rangeControllerEndUpdates:(ASRangeController *)rangeController +{ ASDisplayNodeAssertMainThread(); [super endUpdates]; } diff --git a/AsyncDisplayKit/Details/ASFlowLayoutController.mm b/AsyncDisplayKit/Details/ASFlowLayoutController.mm index 26bed9eb83..91a57f1650 100644 --- a/AsyncDisplayKit/Details/ASFlowLayoutController.mm +++ b/AsyncDisplayKit/Details/ASFlowLayoutController.mm @@ -113,8 +113,8 @@ static const CGFloat kASFlowLayoutControllerRefreshingThreshold = 0.3; } else { ASDisplayNodeAssert(scrollDirection == ASScrollDirectionNone || scrollDirection == ASScrollDirectionUp || scrollDirection == ASScrollDirectionDown, @"Invalid scroll direction"); - int backScreens = scrollDirection == ASScrollDirectionUp ? self.tuningParameters.leadingBufferScreenfuls : self.tuningParameters.trailingBufferScreenfuls; - int frontScreens = scrollDirection == ASScrollDirectionUp ? self.tuningParameters.trailingBufferScreenfuls : self.tuningParameters.leadingBufferScreenfuls; + CGFloat backScreens = scrollDirection == ASScrollDirectionUp ? self.tuningParameters.leadingBufferScreenfuls : self.tuningParameters.trailingBufferScreenfuls; + CGFloat frontScreens = scrollDirection == ASScrollDirectionUp ? self.tuningParameters.trailingBufferScreenfuls : self.tuningParameters.leadingBufferScreenfuls; startIter = ASFindIndexForRange(_nodeSizes, _visibleRangeStartPos, - backScreens * viewportSize.height, _layoutDirection); endIter = ASFindIndexForRange(_nodeSizes, _visibleRangeEndPos, frontScreens * viewportSize.height, _layoutDirection);