Skip to content

生成LayoutAttributes时创建indexPath不要用indexPathWithIndex。crash! #1

@451222664

Description

@451222664

生成LayoutAttributes时创建indexPath用indexPathWithIndex,会导致在swift中的collectionView返回组头viewForSupplementaryElementOfKind这个方法取indexPath.section时崩溃。改成
NSIndexPath *indexPath = [NSIndexPath indexPathForRow:0 inSection:i];
就好了

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions