Reputation: 514
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
Upvotes: 5
Views: 2074
Reputation: 6668
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.
Upvotes: 4
Reputation: 385510
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
.
Upvotes: 3