Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Smooth scroll with UIImageView as subview of GridCellView #146

Open
AndreaV88 opened this Issue · 2 comments

3 participants

@AndreaV88

Hi, i'm a problem with my application. I'm using your grid but i've problem if i insert an uiimageview as subview of grid cell.
Here's my code:

  • (GMGridViewCell *)GMGridView:(GMGridView *)gridView cellForItemAtIndex:(NSInteger)index {
    GridAlbumItemView *gridAlbumItem = nil;

    GMGridViewCell *cell = [gridView dequeueReusableCell];

    if (!cell)
    cell = [[GMGridViewCell alloc] init];

    UIImageView* imageView = [[UIImageView alloc] initWithFrame:cell.bounds];
    [imageView setImage:[sourceArtworkArray objectAtIndex:index]]; //Artwork are cached into an array

    cell.contentView = imageView;

    return cell;
    }

All grid item contains album artwork of ipod library.
I'm using ARC.
Anyone can help me to improve scrolling?

@bagusflyer

Your code looks not correct because you assign the image inside the cell creation part. That means the reused cell won't be assign the correct image.

@benroo

Any one to provide more details on this? I've the same queries here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.