Get Updates By E-mail 

Article Written By:
Johann Dowa

An Open source iOS Slide-In Sidebar Component With Physics Exactly Like A UIScrollView

  •  
  •  
  •  
  •  
  •  

Something that you might notice when using sidebar type controls is that the side views don’t always scroll exactly like you’d expect when compared to Apple’s native UIScrollView control.  Typically they will just follow slide in and stop at an exact point when sliding in, or the added physics just doesn’t seem right.  Luis Recuenco recently submitted a slide-in sidebar control called LRScrollingSidebarController  aimed specifically at this issue.

Here’s what Luis writes about this occurrence in the read me:

When you drag and release the panels, you feel like they stop suddenly, sharply, the panels don’t flow and slide like they should. Mimicking physics as most of the libraries try is very, very difficult, you won’t do it perfectly and you will feel this sudden speed changes or sharpness and abruptness when releasing the finger with a certain velocity.

LRScrollingSidebarController solves this problem by simply using an actual scroll view so the physics perform exactly as you’d expect.

A couple of images from the LRScrollingSidebarController example project:

LRScrollingSidebarController LRScrollingSidebarController

You can find LRScrollingsidebarController on Github here.

Thanks to Luis for the submission.


  •  
  •  
  •  
  •  
  •  

Submit A Resource

Have you created a useful tutorial, library or tool for iOS development that you would like to get in front of our 300,000+ monthly page views from iOS developers?

You can submit the url here.

The resources we feel will appeal to our readers the most will be posted on the front page.

Comments