-
Notifications
You must be signed in to change notification settings - Fork 2.2k
[ASCollectionView] Use UICollectionViewLayout invalidation events to relayout #691
Comments
@levi has any aspect of this been implemented? Is this entirely to allow repositioning elements by driving the UICollectionVIewLayout, or are there other benefits? |
Nothing implemented yet. I would like to eventually add this, as most of the layout invalidation we do is conformed to the behaviors of a table view. The beauty of collection views is that their layout is managed by the layout object and its Definitely a nice to have that's not super important for most collection view uses, but something I want to do in the next couple of months so |
This issue was moved to TextureGroup/Texture#105 |
This fixes the broken documentation here: http://texturegroup.org/docs/layout2-api-sizing.html
Issue #690 brought up a good point I've been thinking about as I was putting together the supplementary view architecture briefly this weekend. The current data controller integration with ASCollectionView reiles upon layout invalidation from reloading/inserting/deleting/moving items or @nguyenhuy's new relayout items based upon the collection view's bounds changes. These behaviors closely model the specific implementation of a table view, but it's clear as we have begun to mature the behavior of our collection view most of the sizing events and values (namely constrainedSizeForNode:) have been built around the powerful Collection view layouts.
I've been doing a bit of research into the
invalidateLayout
andinvaldateLayoutWithContext:
methods. While the provided context is not as granular as I initially hoped, I believe these events are great candidates for us to use as hooks for relayout events in the collection view's data controller.Moreover, as we query the collection view for constrained sizes I think we should start asking the collection view layout for specific values. This will move the layout (constrainedSizeForNode:) code we currently have in ASCollectionView into a separate place that is specific to the current collection view layout.
With that, a couple of solutions have come to mind:
Use correct format identifiers for logs on 64 bit systems. #1 and Fix incorrect string format specifier for NSInteger #2 is where I'm planning to go this week to get my branch building and running. I feel that it should be a flexible enough solution to test and also to continue composing as custom layout authors investigate using their layouts with supplementary views. Inconsistent boolean property naming #3 is where I'd like to start discussion, as it's a little more involved and not something I'm planning to do this week.
Wrote this on my phone, so let me know if anything doesn't make sense.
The text was updated successfully, but these errors were encountered: