Skip to content

Sticky Header animation issue #4

@futuretap

Description

@futuretap

I've an issue when using the sticky header feature in combination with cell deletion. The section header doesn't stick. See this screen video:

http://d.pr/v/gS8U

To reproduce the issue, just add this method to StickyHeadersCollectionViewController.m:

- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath {
    [collectionView performBatchUpdates:^{
        TLIndexPathSectionInfo *section = [self.indexPathController.dataModel sectionInfoForSection:indexPath.section];
        NSMutableArray *filtered = [section.objects mutableCopy];
        [filtered removeObjectAtIndex:indexPath.row];
        section = [[TLIndexPathSectionInfo alloc] initWithItems:filtered name:section.name];

        NSMutableArray *sectionInfos = [self.indexPathController.dataModel.sections mutableCopy];
        sectionInfos[indexPath.section] = section;
        self.indexPathController.dataModel = [[TLIndexPathDataModel alloc] initWithSectionInfos:sectionInfos identifierKeyPath:nil];
    } completion:nil];
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions