Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Replicating ScrollView functionality in Passbook.app UI

I'm trying to replicate the Passbook.app UI, and can't seem to figure out the basic structure of the interface.

When you just have one pass loaded, you can drag a pass up, and it snaps back in place. You can drag the pass down, and it snaps back in place.

I've created a UIScrollView and added a subview (representing a pass). I set the scrollView's contentSize to be greater than the device screen, but I don't get any snapping; the pass just scrolls off or on the screen. Anything less than the device screen and no scrolling occurs at all.

Any ideas how they are getting that effect? Possibly using multiple UIScrollViews?

like image 740
djibouti33 Avatar asked Feb 18 '26 12:02

djibouti33


1 Answers

Update: I've created a sample of how this can be achieved using UICollectionView, I hope it helps you to go in the right direction.

I've been digging into this. I used Reveal to explore the view hierarchy. Basically it uses a UIScrollView with many UIScrollViews inside each of them connected to a UIDynamicAnimator.

Look for the headers here.

reveal

like image 110
3lvis Avatar answered Feb 21 '26 06:02

3lvis



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!