Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UIScrollView or UIPageViewController

Iam working on app for iOS5. I would like to have a big picture in a small frame, at one time in this frame would be shown only part of the image. When user swipe right or left the image would shift to its second half. I would like to ask you what should I use, UIScrollView or UIPageViewController?? Or should I use anything else?? Thanks for all the tips

like image 654
Skodik.o Avatar asked Feb 20 '12 07:02

Skodik.o


2 Answers

I would recommend using a UIScrollView with its pagingEnabled property set to YES.

This will make it snap to multiplies of its view bounds. So if your view is 640 wide, and your image is 1280 wide, it will snap between the first half and second half.

like image 107
Jeshua Lacock Avatar answered Sep 28 '22 12:09

Jeshua Lacock


If you want the image to slide to the left or right, then use UIScrollView (perhaps with pagingEnabled set to YES). If you want a page-turn effect, use UIPageViewController.

like image 36
rob mayoff Avatar answered Sep 28 '22 11:09

rob mayoff