0

I'm using TLLayoutTransitioning (https://github.com/wtmoose/TLLayoutTransitioning) to animate a resize of my UICollectionView cells. The example resize in the demo code is what I want (full size to small size). However I need to retain a single row horizontal layout - at the moment it lays out multiple rows to fill the screen. I'm not sure how to achieve this with UICollectionView or this layout library.

I've tried resizing the collection view itself (frame change), with limited success; it's not sizing correctly after the cells have resized. I don't even know if this is the correct way to achieve my single row layout?

The final piece of the puzzle is for the contents within the cells (a label and an image) to resize along with the cell.

Shocks
  • 808
  • 1
  • 9
  • 18

1 Answers1

0

It was as simple as changing the section inset for the selected layout.

collectionView.myLayout.sectionInset = UIEdgeInsetsMake(0, 0, 0, 0);

Adding a top and bottom value greater enough to create the space create the single row layout.

Shocks
  • 808
  • 1
  • 9
  • 18
  • Glad you solved it. Sorry, I did not see this question until just now or I would have answered. – Timothy Moose Apr 08 '14 at 20:21
  • One issue I am having is that it's incredible zomming out the collection view. I believe it's rendering more than the 3 cells I can see onscreen in my horizontal flow layout. Would like to know how I can improve this. The zooming animation gets slow the closer to the middle I get. I'm basically trying to recreate the task manager in iOS 7 (double tap home). Thanks :) – Shocks Apr 10 '14 at 20:09
  • I'd need more information before I could help. When you say "it gets slow", I'm unclear whether you're having a performance issue or if you're unhappy with the easing curve. Perhaps post a new question with your code? – Timothy Moose Apr 11 '14 at 03:02