views:

55

answers:

1

What would be the best way to accomplish the home screen folder roll-open effect with views in Objective C?

+2  A: 

If you take a look at the images inside the Springboard.app in your iPhone in "/System/Library/CoreServices" you can have an idea of how the animation works. A simple version of the effect can be done this way:

  1. Take a screenshot of the screen you want to "cut" and save it in an image
  2. Create two imageviews each of which has a part of the screenshot (e.g. the first has the first upper part of the image as background, the second the rest), you could alternative use the same background image for both views, you have only to play with content alignments.
  3. Place the two views on the original screen in the exact position to make them seem like one entire image perfectly aligned with the original screen.
  4. Create a view (folder content) with its own background and whatever you want to put inside, place it at the same Y of the bottom imageview but beneath it.
  5. Make the bottom image view scroll down for the entire size of the content view, you will see the folder content appear.

iOS version put on the sliding images some nice borders and applies fade effect which make the overall animation really cool. You can sure try and make it nice looking. Hope this helps

MaxFish