UXMPDFKit icon indicating copy to clipboard operation
UXMPDFKit copied to clipboard

Crash For iPhone 6s

Open look416 opened this issue 6 years ago • 0 comments

iPhone 6s will crash when trying to load the documents under vertical orientation.

Using storyboard method VC, set the flow direction for the collection view to be vertical.

under UICollectionViewDelegateFlowLayout->section vertical the contentViewSize.width is 464.000000006 and the bounds.width is 464 By doing comparison between two value which equates to false and hence will go to fatal error.

You can refer to PDFSinglePageViewer.swift -> Line 172

Surprisingly, this only happens to iPhone 6s, it works will with my iPhone X and iPhone 4.

My suggestion would be by flooring the value for contextViewSize before comparing the value with bounds.

look416 avatar Aug 09 '18 07:08 look416