0

In my application, I have a screen with some information, belongs to specified date. I want to make a swipe effect, to drag screen to left and right, to change dates.

I think, I should create 2 UIView (one with "tomorrow" date and second one with "yesterday").

How can I make effect, when I start do drag, to move both view controlles, that one start disappear out from screen, and another start to appear, like we turn over photos in standard applications?

Thank you.

Andrey
  • 2,659
  • 4
  • 29
  • 54

2 Answers2

1

There is a library called iCarousel. It does exactly what you are asking for amd saves a lot of trouble by taking care of all the animation/gestural coding. Use it.

Ravi
  • 7,929
  • 6
  • 38
  • 48
1

Use a UIScrollView. Set up your UIScrollView with paging and then set a content size...

yourScrollView.contentSize = CGSizeMake(320 * numberOfPages, 100);

If you need to know which view the user is on use "scrollViewDidScroll:" to figure out which page they are viewing.

AndyDev
  • 1,409
  • 10
  • 17
  • Thank you for answer, but I think, it is not very good idea for me. After changing one page to another, I want to "rebuild" left and right pages to according dates. – Andrey Sep 30 '12 at 13:27