0

I was wondering if anyone can recommend any libraries I can use to achieve the album cover scroll effect just like the one on the Spotify iPad application when viewing the full screen player...

The idea is to have an image stay in the middle of the page and once that image is dragged down it can either snap back to its place when released or if passed a certain threshold will snap the next image into the middle

Here are some screenshots as an example...

during the specific song the album cover is in the middle

you can drag the album cover down and have it snap back to it place

MiMo
  • 4,905
  • 3
  • 22
  • 23
  • Scrollviews can snap to integral positions with paging enabled. It's a little trickier but very doable when the page size is different from the scroll view's frame. See this answer for a start: http://stackoverflow.com/questions/1220354/uiscrollview-horizontal-paging-like-mobile-safari-tabs/1220605#1220605 – danh Jun 26 '14 at 02:34

1 Answers1

0

You should be able to use Cocoa's native UICollectionView for this with some minor tweaks. The UICollectionViewCells would contain the album artwork (and possibly the controls if you're looking for that to scroll and snap, too).

To get the 'snapping' effect after the album moves past a certain threshold, you want to add the <UIScrollViewDelegate> to your controller and implement -scrollViewWillEndDragging. You then calculate the offset of the nearest cell and notify the UICollectionView of the cell's position.

Check out this SO question and this snippet, both talking about this effect.

Community
  • 1
  • 1
Janum Trivedi
  • 1,660
  • 2
  • 16
  • 24