When debugging custom UICollectionView via View Debug it's width is 829
, but when it's width is accessed via code it's width is 820
. What am I missing?
Visual debug:
Code:
func collectionView(_ collectionView: UICollectionView, layout: UICollectionViewLayout, sizeForItemAt: IndexPath) -> CGSize
{
let widthForCulculation = self.frame.size.width // 820.0
...
return CGSize(width: segmentWidth, height: segmentHeight)
}