I have a function that calculates the width of the cells for me based on a CollectionView. This layout is dynamic. In the simulator I repeated the case that the width / height of the CollectionView is NaN. How can I catch this value?
unfortunately the following solution does not work:
var collectionViewWidth = collectionView.frame.size.widthguard !widthCollectionView.isNaN, !widthCollectionView.isInfinite else { return 250}collectionViewWidth -= collectionView.safeAreaInsets.left + collectionView.safeAreaInsets.right
Why isn't the case caught? guard should be able to catch the value, or not?