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

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

Open
451222664 opened this issue Jul 30, 2019 · 2 comments

Comments

@451222664
Copy link

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

@nobodyJee
Copy link
Owner

@451222664 谢谢 没有用 swift 试过 ,最近会改写成 swift

@451222664
Copy link
Author

跟Swift没关系,你在你demo的viewForSupplementaryElementOfKind方法打印 indexPath.section 也会崩

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