Skip to content

Commit

Permalink
Replace NSLog calls with DLog.
Browse files Browse the repository at this point in the history
  • Loading branch information
gjritter committed Jan 18, 2012
1 parent 559115c commit 7d028c1
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
26 changes: 13 additions & 13 deletions LolayGridView.m
Expand Up @@ -51,7 +51,7 @@ - (void) setup {
}

- (id) initWithCoder:(NSCoder*) decoder {
NSLog(@"[LolayGridView initWithCoder] enter");
DLog(@"[LolayGridView initWithCoder] enter");
self = [super initWithCoder:decoder];

if (self) {
Expand All @@ -62,7 +62,7 @@ - (id) initWithCoder:(NSCoder*) decoder {
}

- (id) initWithFrame:(CGRect) inRect {
NSLog(@"[LolayGridView initWithFrame] enter");
DLog(@"[LolayGridView initWithFrame] enter");
self = [super initWithFrame:inRect];

if (self) {
Expand All @@ -73,7 +73,7 @@ - (id) initWithFrame:(CGRect) inRect {
}

- (void) didReceiveMemoryWarning {
NSLog(@"[LolayGridView didReceiveMemoryWarning] enter");
DLog(@"[LolayGridView didReceiveMemoryWarning] enter");
[self.reusableGridCells removeAllObjects];
}

Expand Down Expand Up @@ -192,7 +192,7 @@ - (void) scrollToRow:(NSInteger) gridRowIndex atColumn:(NSInteger) gridColumnInd


- (void) handleContentSize {
NSLog(@"[LolayGridView handleContentSize] enter");
DLog(@"[LolayGridView handleContentSize] enter");
NSInteger numRows = self.numberOfRows;
NSInteger numColumns = self.numberOfColumns;

Expand Down Expand Up @@ -221,7 +221,7 @@ - (void) handleContentSize {
contentHeight += maxColumnInset;

self.contentSize = CGSizeMake(contentWidth, contentHeight);
NSLog(@"[LolayGridView handleContentSize] exit self.content.size=(%2f,%2f)", contentWidth, contentHeight);
DLog(@"[LolayGridView handleContentSize] exit self.content.size=(%2f,%2f)", contentWidth, contentHeight);
}

- (CGRect) loadedContentRect {
Expand All @@ -245,7 +245,7 @@ - (void) reuseCell:(LolayGridViewCell*) cell {
}

- (void) handleCells {
NSLog(@"[LolayGridView handleCells] enter");
DLog(@"[LolayGridView handleCells] enter");

NSInteger rows = self.numberOfRows;
NSInteger columns = self.numberOfColumns;
Expand All @@ -256,13 +256,13 @@ - (void) handleCells {

if ([self.handleCellsLock tryLock]) {
CGRect loadedRect = [self loadedContentRect];
NSLog(@"[LolayGridView handleCells] loadedRect=(%2f,%2f,%2f,%2f)", loadedRect.origin.x, loadedRect.origin.y, loadedRect.size.width, loadedRect.size.height);
DLog(@"[LolayGridView handleCells] loadedRect=(%2f,%2f,%2f,%2f)", loadedRect.origin.x, loadedRect.origin.y, loadedRect.size.width, loadedRect.size.height);

// Reclaim some cells
NSMutableSet* reuseSet = [NSMutableSet setWithCapacity:self.inUseGridCells.count / 2];
for (LolayGridViewCell* cell in self.inUseGridCells) {
if (! CGRectIntersectsRect(loadedRect, cell.frame)) {
NSLog(@"[LolayGridView handleCells] reusing cell uuid=%@, row=%i column=%i", cell.uuid, cell.rowIndex, cell.columnIndex);
DLog(@"[LolayGridView handleCells] reusing cell uuid=%@, row=%i column=%i", cell.uuid, cell.rowIndex, cell.columnIndex);
[self reuseCell:cell];
[reuseSet addObject:cell];
}
Expand Down Expand Up @@ -305,7 +305,7 @@ - (void) handleCells {
maxColumn = columns - 1;
}

NSLog(@"[LolayGridView handleCells] (minRow,minColumn:maxRow,maxColumn)=(%i,%i:%i,%i)", minRow, minColumn, maxRow, maxColumn);
DLog(@"[LolayGridView handleCells] (minRow,minColumn:maxRow,maxColumn)=(%i,%i:%i,%i)", minRow, minColumn, maxRow, maxColumn);

for (NSInteger row = minRow; row <= maxRow; row++) {
CGFloat insetForRow = [self delegateInsetForRow:row];
Expand Down Expand Up @@ -346,7 +346,7 @@ - (void) handleCells {
}

- (void) reloadData {
NSLog(@"[LolayGridView reloadData] enter");
DLog(@"[LolayGridView reloadData] enter");
self.loadedOnce = YES;
[self.reloadLock lock];

Expand Down Expand Up @@ -389,7 +389,7 @@ - (void) checkScrolledToEdge {
}

- (void) clearAllCells {
NSLog(@"[LolayGridView clearAllCells] enter");
DLog(@"[LolayGridView clearAllCells] enter");
self.numberOfRows = 0;
self.numberOfColumns = 0;
self.inUseGridCells = nil;
Expand Down Expand Up @@ -426,7 +426,7 @@ - (LolayGridViewCell*) cellForTag:(NSInteger)tag {
#pragma mark LolayGridViewCellDelegate Methods

- (void) didSelectGridCell:(LolayGridViewCell*) gridCellView {
NSLog(@"[LolayGridView didSelectGridCell] enter");
DLog(@"[LolayGridView didSelectGridCell] enter");
if ([self.delegate respondsToSelector:@selector(gridView:didSelectCellAtRow:atColumn:)]) {
[self.delegate gridView:self didSelectCellAtRow:gridCellView.rowIndex atColumn:gridCellView.columnIndex];
}
Expand All @@ -436,7 +436,7 @@ - (void) didSelectGridCell:(LolayGridViewCell*) gridCellView {
#pragma mark UIView Methods

- (void) drawRect:(CGRect) rect {
NSLog(@"[LolayGridView drawRect] enter");
DLog(@"[LolayGridView drawRect] enter");
[super drawRect:rect];
if (! self.loadedOnce) {
[self reloadData];
Expand Down
2 changes: 1 addition & 1 deletion LolayGridViewCell.m
Expand Up @@ -33,7 +33,7 @@ @implementation LolayGridViewCell

- (void) setupWithFrame:(CGRect) frame reuseIdentifier:(NSString*) reuseIdentifier {
self.uuid = [NSString stringWithUUID];
NSLog(@"[LolayGridViewCell initWithFrame] uuid=%@", self.uuid);
DLog(@"[LolayGridViewCell initWithFrame] uuid=%@", self.uuid);
self.reuseIdentifier = reuseIdentifier;
self.frame = frame;
self.backgroundView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, frame.size.width, frame.size.height)];
Expand Down

0 comments on commit 7d028c1

Please sign in to comment.