Merge pull request #272 from facebook/format-cleanup

Code format cleanup
This commit is contained in:
Nadine Salter 2015-01-29 10:53:26 -08:00
commit 549d40dac0
2 changed files with 18 additions and 10 deletions

View File

@ -100,7 +100,7 @@ static BOOL _isInterceptedSelector(SEL sel)
#pragma mark - #pragma mark -
#pragma mark ASTableView. #pragma mark ASTableView
@interface ASTableView () <ASRangeControllerDelegate, ASDataControllerSource> { @interface ASTableView () <ASRangeControllerDelegate, ASDataControllerSource> {
_ASTableViewProxy *_proxyDataSource; _ASTableViewProxy *_proxyDataSource;
@ -117,7 +117,7 @@ static BOOL _isInterceptedSelector(SEL sel)
@implementation ASTableView @implementation ASTableView
#pragma mark - #pragma mark -
#pragma mark Lifecycle. #pragma mark Lifecycle
- (instancetype)initWithFrame:(CGRect)frame style:(UITableViewStyle)style - (instancetype)initWithFrame:(CGRect)frame style:(UITableViewStyle)style
{ {
@ -141,7 +141,7 @@ static BOOL _isInterceptedSelector(SEL sel)
} }
#pragma mark - #pragma mark -
#pragma mark Overrides. #pragma mark Overrides
- (void)setDataSource:(id<UITableViewDataSource>)dataSource - (void)setDataSource:(id<UITableViewDataSource>)dataSource
{ {
@ -216,7 +216,9 @@ static BOOL _isInterceptedSelector(SEL sel)
return visibleNodes; return visibleNodes;
} }
#pragma mark Assertions.
#pragma mark -
#pragma mark Assertions
- (void)throwUnimplementedException - (void)throwUnimplementedException
{ {
@ -235,6 +237,10 @@ static BOOL _isInterceptedSelector(SEL sel)
[self throwUnimplementedException]; [self throwUnimplementedException];
} }
#pragma mark -
#pragma mark Editing
- (void)insertSections:(NSIndexSet *)sections withRowAnimation:(UITableViewRowAnimation)animation - (void)insertSections:(NSIndexSet *)sections withRowAnimation:(UITableViewRowAnimation)animation
{ {
[_dataController insertSections:sections withAnimationOption:animation]; [_dataController insertSections:sections withAnimationOption:animation];
@ -276,7 +282,7 @@ static BOOL _isInterceptedSelector(SEL sel)
} }
#pragma mark - #pragma mark -
#pragma mark Intercepted selectors. #pragma mark Intercepted selectors
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{ {
@ -353,14 +359,16 @@ static BOOL _isInterceptedSelector(SEL sel)
#pragma mark - #pragma mark -
#pragma mark ASRangeControllerDelegate. #pragma mark ASRangeControllerDelegate
- (void)rangeControllerBeginUpdates:(ASRangeController *)rangeController { - (void)rangeControllerBeginUpdates:(ASRangeController *)rangeController
{
ASDisplayNodeAssertMainThread(); ASDisplayNodeAssertMainThread();
[super beginUpdates]; [super beginUpdates];
} }
- (void)rangeControllerEndUpdates:(ASRangeController *)rangeController { - (void)rangeControllerEndUpdates:(ASRangeController *)rangeController
{
ASDisplayNodeAssertMainThread(); ASDisplayNodeAssertMainThread();
[super endUpdates]; [super endUpdates];
} }

View File

@ -113,8 +113,8 @@ static const CGFloat kASFlowLayoutControllerRefreshingThreshold = 0.3;
} else { } else {
ASDisplayNodeAssert(scrollDirection == ASScrollDirectionNone || scrollDirection == ASScrollDirectionUp || scrollDirection == ASScrollDirectionDown, @"Invalid scroll direction"); ASDisplayNodeAssert(scrollDirection == ASScrollDirectionNone || scrollDirection == ASScrollDirectionUp || scrollDirection == ASScrollDirectionDown, @"Invalid scroll direction");
int backScreens = scrollDirection == ASScrollDirectionUp ? self.tuningParameters.leadingBufferScreenfuls : self.tuningParameters.trailingBufferScreenfuls; CGFloat backScreens = scrollDirection == ASScrollDirectionUp ? self.tuningParameters.leadingBufferScreenfuls : self.tuningParameters.trailingBufferScreenfuls;
int frontScreens = scrollDirection == ASScrollDirectionUp ? self.tuningParameters.trailingBufferScreenfuls : self.tuningParameters.leadingBufferScreenfuls; CGFloat frontScreens = scrollDirection == ASScrollDirectionUp ? self.tuningParameters.trailingBufferScreenfuls : self.tuningParameters.leadingBufferScreenfuls;
startIter = ASFindIndexForRange(_nodeSizes, _visibleRangeStartPos, - backScreens * viewportSize.height, _layoutDirection); startIter = ASFindIndexForRange(_nodeSizes, _visibleRangeStartPos, - backScreens * viewportSize.height, _layoutDirection);
endIter = ASFindIndexForRange(_nodeSizes, _visibleRangeEndPos, frontScreens * viewportSize.height, _layoutDirection); endIter = ASFindIndexForRange(_nodeSizes, _visibleRangeEndPos, frontScreens * viewportSize.height, _layoutDirection);