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

Crash with nil header #5

Closed
oks opened this issue Oct 13, 2014 · 3 comments
Closed

Crash with nil header #5

oks opened this issue Oct 13, 2014 · 3 comments

Comments

@oks
Copy link

oks commented Oct 13, 2014

In your method:

- (UICollectionReusableView *)collectionView:(UICollectionView *)collectionView
           viewForSupplementaryElementOfKind:(NSString *)kind
                                 atIndexPath:(NSIndexPath *)indexPath
{
    UICollectionReusableView <DTModelTransfer> *view = nil;
    id supplementary = nil;
    if ([self.storage respondsToSelector:@selector(supplementaryModelOfKind:forSectionIndex:)])
    {
        supplementary = [self.storage supplementaryModelOfKind:kind forSectionIndex:indexPath.section];
    }

    if (supplementary)
    {
        view = [self.factory supplementaryViewOfKind:kind
                                             forItem:supplementary
                                         atIndexPath:indexPath];
        [view updateWithModel:supplementary];
    }

    return view;
}

If no reusable view was registered, you will return nil. Since IOS7 it's create a crash.

@oks
Copy link
Author

oks commented Oct 13, 2014

And hack with CGSizeZero - not helpful (((

@DenTelezhkin
Copy link
Owner

I don't see this behavior not in example project, not in my apps. Can you provide details, or maybe an example, when this happens?

@oks
Copy link
Author

oks commented Oct 14, 2014

I don't using your project no more. Too many "intended behaviours".

@oks oks closed this as completed Oct 14, 2014
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