kalmesh123 / ios_GoogleSearchApp

0 stars 0 forks source link

Please review my app #1

Open kalmesh123 opened 11 years ago

kalmesh123 commented 11 years ago

/cc @nesquena @timothy1ee

timothy1ee commented 11 years ago

OK, good job. I'm a little bit confused why you needed the code below...

    customCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:CellIdentifier forIndexPath:indexPath];
    UIImageView *imageView = nil;
    if (cell == nil) {
        cell = [[customCell alloc] initWithFrame:CGRectMake(0, 0, 80, 80)];
        imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 80, 80)];
        imageView.contentMode = UIViewContentModeScaleAspectFill;
        [cell setImage:imageView];
    } else {
        imageView = cell.image;
        if (imageView == nil) {
            imageView = [[UIImageView alloc] init];
            imageView.contentMode = UIViewContentModeScaleAspectFill;
        }
    }

Since you have a custom cell nib, and you've registered the cell, is the code above correct?