0

I'm interested in building a class that uses custom scroll behavior. I've tried implementing a few approaches thus far that aren't really working like I'd hoped they would.

The idea of the custom scroll animation is to create a "folder tab" effect. The first cell is expanded to nearly full screen, while the next cells after it are collapsed into smaller sized cells. As you scroll down, the next cell expands and becomes the main cell, subsequently pushing the cell before it up and off the screen. The animation itself is right in the same ballpark as paging looks in a UIScrollView.

If my explanation isn't clear enough, I'm trying to almost replicate what the Ultravisual iPhone app has built in their collections page.

Any viewpoints and/or opinions on how I could approach implementing something like this would be greatly appreciated!

jakenberg
  • 2,125
  • 20
  • 38
  • 1
    Check out http://stackoverflow.com/questions/20250470/ultravisual-iphone-app-like-uiview-or-uitableview-scroll – Andy Poes Jun 05 '14 at 19:14

1 Answers1

0

You'll need to implement UIScrollViewDelegate for that. You can check the current scroll position in the delegate method scrollViewDidScroll:, and expand/collapse your cells as necessary.

TotoroTotoro
  • 17,524
  • 4
  • 45
  • 76
  • I'm assuming by "scroll position" you mean the contentOffset. I'm aware of that, but I'm able to use the same delegate in a UICollectionView without losing the convenience of the data source methods as well. So far, I believe having the structure that `UICollectionView` provides is going to be key in making this efficiently. – jakenberg Dec 23 '13 at 21:54
  • Yes, you absolutely want to use a `UICollectionView` or `UITableView` for that, so you have cells you can customize. Of course, both of them inherit from `UIScrollView` :) – TotoroTotoro Dec 23 '13 at 21:57