GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Crash on reloadData in collection view when header is offscreen · Issue #15 · CSStickyHeaderFlowLayout/CSStickyHeaderFlowLayout

Crash on reloadData in collection view when header is offscreen #15

New issue
Copy link
New issue
Copy link
Closed
#17
Closed
Crash on reloadData in collection view when header is offscreen#15
#17
Copy link

Description

@jessesquires
jessesquires
opened on Jul 22, 2014
Issue body actions

Hello again @jamztang - found some issues with reloading data on the collection view.

The CSStickyHeaderFlowLayout was calling its base class UICollectionViewLayout layoutAttributesForSupplementaryViewOfKind: method to get layout attributes. That base class knows nothing about the CSStickyHeaderParallaxHeader kind of supplementary view, and was returning nil.

Fix:

- (UICollectionViewLayoutAttributes *)layoutAttributesForSupplementaryViewOfKind:(NSString *)kind atIndexPath:(NSIndexPath *)indexPath
{
    UICollectionViewLayoutAttributes *attributes = [super layoutAttributesForSupplementaryViewOfKind:kind atIndexPath:indexPath];
    if (!attributes && [kind isEqualToString:CSStickyHeaderParallaxHeader]) {
        attributes = [CSStickyHeaderFlowLayoutAttributes layoutAttributesForSupplementaryViewOfKind:kind withIndexPath:indexPath];
    }
    return attributes;
}

Activity

  1. jamztang commented on Jul 25, 2014

    @jamztang
    jamztang
    on Jul 25, 2014
    Collaborator
    More actions

    Thanks @jessesquires I'll take a look. Do you want to make a pull request for this so you can be attributed?

  2. jessesquires commented on Jul 25, 2014

    @jessesquires
    jessesquires
    on Jul 25, 2014
    ContributorAuthor
    More actions

    sure! i just didn't have time the other day. 👍

  3. jamztang
    closed this as completedin #17on Jul 31, 2014
  4. jamztang
    added a commit that references this issue on Jul 31, 2014

    Merge pull request #17 from jessesquires/issue15_fix

    This issue will close once commit d56c545 is merged into the 'master' branch.
    d56c545
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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

      You are visitor 01402792 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.