Hello,
I often have to write the following code while calculating sizes for the cells in my IGListSectionController:
public func sizeForItem(at index: Int) -> CGSize {
let width = collectionContext!.containerSize.width - inset.left - inset.right
let height = collectionContext!.containerSize.width - inset.top - inset.bottom
[...]
that I think it would actually be a nice addition to the framework.
I was thinking about a property on IGListSectionController called like usableSize, visibleSize, paddedSize (or something better :D)
var visibleSize: CGSize {
guard let context = collectionContext else { return CGSize() }
return CGSize(width: context.containerSize.width - inset.left - inset.right,
height: context.containerSize.width - inset.top - inset.bottom)
}
I would like to know if this is something that would the community be interested to add
Thanks @racer1988 ! 馃槃
Is this the same as #315?
Hi @jessesquires ! It is :D UPS!
I read the other issues but I haven't noticed that it was the same thing ahah.
I am going to close this one.
On a separate note (which I cannot test and raise as a issue right now)
I am also going to try again to test on my project as soon as I get around with a iOS 9 phone,
since last time I tested the Framework on iOS 9 I noticed that the insets of the IGListSectionController are not applied correctly. (I think due to the internal changes on how the collectionView is layed out between iOS 9 and iOS 10)
Thanks
Most helpful comment
Hi @jessesquires ! It is :D UPS!
I read the other issues but I haven't noticed that it was the same thing ahah.
I am going to close this one.
On a separate note (which I cannot test and raise as a issue right now)
I am also going to try again to test on my project as soon as I get around with a iOS 9 phone,
since last time I tested the Framework on iOS 9 I noticed that the insets of the IGListSectionController are not applied correctly. (I think due to the internal changes on how the collectionView is layed out between iOS 9 and iOS 10)
Thanks