I am trying to assign UICollectionViewFlowLayout a UICollectionView and it works fine on the physical device, but the simulators will break with the signal:
EXC_ARITHMETIC (code = EXC_i386_DIV, subcode = 0x0)
This only happens on the simulator, I understand that this is usually a division error by 0, but I do not see how this is possible for my implementation
Code:
let flowLayout: UICollectionViewFlowLayout = UICollectionViewFlowLayout() flowLayout.itemSize = CGSizeMake(self.view.bounds.width * 0.67, self.collectionView!.frame.height - 10) flowLayout.scrollDirection = UICollectionViewScrollDirection.Horizontal self.collectionView!.collectionViewLayout = flowLayout
In addition, I get a signal in this line: self.collectionView!.collectionViewLayout = flowLayout
View boundaries: WIDTH: 277.38 HEIGHT: 75.0
Any help or alternatives would be greatly appreciated!
source share