uxmstudio / UXMPDFKit

An iOS PDF viewer and annotator written in Swift that can be embedded into any application.
MIT License
274 stars 104 forks source link

UICollectionViewFlowLayout - Behavior not defined #40

Open JCalabretta-MaxetaTech opened 7 years ago

JCalabretta-MaxetaTech commented 7 years ago

Hi,

I am seeing this when the device is in landscape or portrait

The behavior of the UICollectionViewFlowLayout is not defined because: the item height must be less than the height of the UICollectionView minus the section insets top and bottom values, minus the content insets top and bottom values. The relevant UICollectionViewFlowLayout instance is <UICollectionViewFlowLayout: 0x101544c00>, and it is attached to <UXMPDFKit.PDFSinglePageViewer: 0x10208d000; baseClass = UICollectionView; frame = (0 0; 1024 704); clipsToBounds = YES; gestureRecognizers = <NSArray: 0x170054550>; layer = <CALayer: 0x17002d5a0>; contentOffset: {0, 0}; contentSize: {2048, 768}> collection view layout: <UICollectionViewFlowLayout: 0x101544c00>. Make a symbolic breakpoint at UICollectionViewFlowLayoutBreakForInvalidSizes to catch this in the debugger.

Just wondering what could possibly be causing this?

pushchris commented 7 years ago

This is a known bug in the way the document is drawn in the window relative to the other bars. It does not cause any major issues, just occasionally causes the document to not 100% fill up the available space. There have been a number of pull requests in the past that tried to solve the problem, but it is still around. It is on the list of things to tackle for this framework, but not super high at the moment. If you want to take a stab at it, you are most welcome to, pull requests are always appreciated.