Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disappearing UICollectionViewCells on Add #5

Closed
coreych opened this issue Jun 14, 2013 · 3 comments
Closed

Disappearing UICollectionViewCells on Add #5

coreych opened this issue Jun 14, 2013 · 3 comments

Comments

@coreych
Copy link

coreych commented Jun 14, 2013

Set a larger size for the UICollectionViewCells, horizontal scrolling and default 50 objects. Scroll to the end of the UICollection. Tap the Add button. You will see the the UICollectionViewCells disappearing (38 - 43) and came back on when you tap the Add button again. Any suggestion how to fix / debug this?

This is what I set for RFViewController's viewDidLoad, layout.blockPixels = CGSizeMake(310, 225), and at blockSizeForItemAtIndexPath returning only CGSizeMake(1.0, 1.0).

screen shot 2013-06-15 at 1 44 30 am
screen shot 2013-06-15 at 1 43 39 am

@coreych
Copy link
Author

coreych commented Jun 15, 2013

Resolved this by removing the line _furthestBlockPoint = CGPointZero; from - (void) invalidateLayout.

@coreych coreych closed this as completed Jun 15, 2013
@p-blin
Copy link

p-blin commented Aug 9, 2013

you're patch causes a bug when changing orientation and no scroll is needed, a scroll appears and insets are incorrect

i added the line you removed inside the method 'shouldInvalidateLayoutForBoundsChange'

  • (BOOL)shouldInvalidateLayoutForBoundsChange:(CGRect)newBounds {
    if (!(CGSizeEqualToSize(newBounds.size, self.collectionView.frame.size))){
    _furthestBlockPoint = CGPointZero;
    return YES;
    }
    return NO;
    // return !(CGSizeEqualToSize(newBounds.size, self.collectionView.frame.size));
    }

i'm aware it's not a good practice to change object state in a method that should simply return YES or NO but my time to investigate this bug is limited.

@coreych
Copy link
Author

coreych commented Aug 12, 2013

Thanks for this wasn't aware of the bugs created. I hope Bryce can investigate this further.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants