nek023 / QBImagePicker

A clone of UIImagePickerController with multiple selection support.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CollectionViewLayout isn't properly set up on iPad

tobihagemann opened this issue · comments

QBImagePicker: 3.4.0
Device: any iPad
iOS: 9.3

I'm not sure if and when this bug has been introduced, but the collectionViewLayout isn't properly set up on an iPad, if the view controller isn't fullscreen. I could've sworn that this wasn't like that in previous iOS versions.

This is how it looks like with numberOfColumnsInLandscape = 7 and a view controller as formsheet:

simulator screen shot 08 apr 2016 16 38 06

The problem seems to be that collectionView:layout:sizeForItemAtIndexPath: is called too early. In my opinion this is an issue with iOS, but I'm looking for a workaround.

If I rotate my iPad back and forth, everything looks fine:

simulator screen shot 08 apr 2016 16 38 13

In the meantime I'll probably just stick to fullscreen view controllers, but it would be amazing, if someone knows another solution!

I have the same problem.😞