Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1935
Bizarre issue with cellAt:
posted

I don't know what's going on here (see attached video), but when i build the cells using the cellAt: method, instead of getting a white-filled or blue-filled star on each of the cells along the bottom, I get a fairly fixed star, and a star dancing around from cell to cell as I move the row side to side.

My code is basically this...

    -(IGGridViewCell*)gridView:(IGGridView *)gridView cellAt:(IGCellPath *)path

    {

        // Attempt to get an existing cell, or create one if not cached.

        // ...

        iRpImageAndMedia *imageAndMediaItem = [thePropertyImageSet objectAtIndex:path.columnIndex];

        

        if (path.rowIndex == 0) {

            return [self buildImageViewCellForGridViewCellAt:path withImageAndMediaItem:imageAndMediaItem];

        }

        else {

            return [self buildImageLabelingCellForGridViewCellAt:path withImageAndMediaItem:imageAndMediaItem];

        }

    }

    -(IGGridViewCell*)buildImageViewCellForGridViewCellAt:(IGCellPath*)path withImageAndMediaItem:(iRpImageAndMedia*)imageAndMediaItem

    {

        IGGridViewImageCell* theImageCell = [theGridViewFilmstrip dequeueReusableCellWithIdentifier:IMAGE_CELL];

        

        if (theImageCell == nil) {

            theImageCell = [[IGGridViewImageCell alloc] initWithReuseIdentifier:IMAGE_CELL];

        }

        theImageCell.enableZooming = NO;

        theImageCell.contentMode = UIViewContentModeScaleAspectFit;

        theImageCell.opaque = YES;

        theImageCell.imageView.image = [imageAndMediaItem pictureForViewOfSize:CGSizeMake(213, 160)];

        theImageCell.imageView.userInteractionEnabled = YES;

        [self getMarkerForCell:theImageCell imageAndMediaItem:imageAndMediaItem];

        

        [self addGestureRecognizersToCell:theImageCell];

        return theImageCell;

    }




    -(void)getMarkerForCell:(IGGridViewImageCell*)cell imageAndMediaItem:(iRpImageAndMedia*)imageAndMediaItem

    {

        if (imageAndMediaItem.isPrimary) {

            [cell addSubview:[primaryImageMarkers valueForKey:@"yes"]];

        }

        else {

            [cell addSubview:[primaryImageMarkers valueForKey:@"no"]];

        }

    }


2016-04-28_08-05-11.mp4.zip