Closed geoffnix closed 9 years ago
Geoff,
I’m glad you found this useful and I appreciate the contribution.
But…
I actually added support for supplementary views last week! See https://github.com/wtmoose/TLLayoutTransitioning/issues/8
If you haven’t already done so, check out the new features in version 1.0.0:
Changes in 1.0.0
toContentOffset
even further with additional configuration options:
placementAnchor
a relative anchor point for the placement calculationplacementInset
an inset of the collection view frame for the placement calculationtoSize
the expected final collection view size (allows for transitioning to a different size)toContentInset
the expected final content inset (allows for transitioning to a different inset)transitionTime
property added to TLTransitionLayout
for fine-tuning
transition of elements, such as those that need to follow a different easing curve,
delayed transition start, or different transition durationTLConvertTimespace
for transitioning elements with simulated delay
and duration relative to the overall transition progressTLRelativePointInRect
for calculating a relative point for a given
rect and point. Useful for the new placementAnchor
option.I will take a look through your implementation to see if there is anything I can merge in.
One improvement I want to make is to have the transition layout automatically determine the supplementary view kinds (in my implementation, you have to provide a list to the constructor).
Best,
Tim
On Apr 22, 2014, at 2:12 PM, geoffnix notifications@github.com wrote:
This project is awesome and saved me a lot of time. One thing missing was support for layouts with headers and footers. Here's what I changed to support my app.
You can merge this Pull Request by running
git pull https://github.com/modcloth/TLLayoutTransitioning header_support Or view, comment on, or merge it at:
https://github.com/wtmoose/TLLayoutTransitioning/pull/9
Commit Summary
Add support for headers and footers File Changes
M TLLayoutTransitioning/TLTransitionLayout.m (46) Patch Links:
https://github.com/wtmoose/TLLayoutTransitioning/pull/9.patch https://github.com/wtmoose/TLLayoutTransitioning/pull/9.diff — Reply to this email directly or view it on GitHub.
Awesome thanks - I forked just a few days too early, I think.
FWIW, I couldn't find a way to automatically determine what supplementary views are in use. For headers and footers you can call "layoutAttributesForSupplementaryViewOfKind:atIndex" for headers and footers for each section - and ignore nil responses. But I could find no way to get other decoration views.
Good luck, and thanks again for a great project.
FWIW, I couldn't find a way to automatically determine what supplementary views are in use.
Yeah I was thinking about that. UICollectionViewLayoutAttributes
has a representedElementKind
property. So I think if you call layoutAttributesForElementsInRect:
with a big enough rect to get everything, you can get the list of kinds by inspecting representedElementKinds
. There's also representedElementCategory
property, so you know the element type.
This project is awesome and saved me a lot of time. One thing missing was support for layouts with headers and footers. Here's what I changed to support my app.