Using PageControl?

I have an array and lets say I have 5 objects in it. The array just contains a string with an address to a picture. I would like to use the Page Control feature in the iPhone SDK to swipe Left and Right to change the picture. I already have the multitouch gestures in place all I need is to implement the Page Control so if I swipe left and then right it will take me back to the previous image.

Does anyone know of any good Page Control tutorials or sample code online that may be able to help me thought implementing the Page Control.


The UIPageControl isn't a control as much as it's just an indication of what "page" your on.

To do what you want, you need to set up a UIScrollView and add subviews for each image. It will require some math to figure out where each "page" starts and ends based on image dimensions and screen sizes.

Apple has some docs on using scroll views with page controls here.

Need Your Help

Android Root ICS for Panda Board

android pandaboard

I've download the ICS source and built it for my pandaboard.

jquery validator - add Rule with Message, Error Class to dynamically created text box

jquery model-view-controller validation jquery-validate

I am using MicrosoftMvcJQueryValidation.js for form validation and it's working great except that I have some dynamic ajax content in my forms that I want to add validation to and I am struggling t...