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] Thread 1: EXC_ARITHMETIC (code=EXC_I386_DIV, subcode=0x0) #159

Open
MariyanskiDev opened this issue Apr 29, 2022 · 0 comments
Open

Comments

@MariyanskiDev
Copy link

Hello there! I have a section:

final class SomeSection: NSCollectionLayoutSection {
    
    convenience init() {
        let estimatedWidth: CGFloat = 100
        let itemSize = NSCollectionLayoutSize(widthDimension: .estimated(estimatedWidth),
                                              heightDimension: .absolute(30))
        let item = NSCollectionLayoutItem(layoutSize: itemSize)
        item.edgeSpacing = NSCollectionLayoutEdgeSpacing(leading: nil,
                                                         top: nil,
                                                         trailing: .fixed(8),
                                                         bottom: nil)
        let groupSize = NSCollectionLayoutSize(widthDimension: .estimated(estimatedWidth),
                                               heightDimension: .absolute(30))
        let group = NSCollectionLayoutGroup.horizontal(layoutSize: groupSize,
                                                       subitems: [item])
                
        self.init(group: group)
        
        orthogonalScrollingBehavior = .continuous
        
        interGroupSpacing = 8
        
        contentInsets = NSDirectionalEdgeInsets(top: 12,
                                                leading: 16,
                                                bottom: 0,
                                                trailing: 0)
    }
}

And I got crash on iOS < 13:
Снимок экрана 2022-04-29 в 10 06 48

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

1 participant