validateTextureDimensions:759: failed assertion `M

2019-08-26 10:11发布

问题:

I am getting this error on iOS 11 while trying to load the MKMapView on a collection cell. Everything works fine until I face this issue, I also tried by disabling the Metal API validation in Edit Scheme's but no luck. Any idea whats going wrong?

回答1:

The problem is with UICollectionViewDelegateFlowLayout where I am passing the CGSize width as collectionView.bounds.width * 0.75. By setting it to fixed width the error is gone. Weird but true!