Search code examples
iphonecore-animation

how to use animation to show the calendar


I can successfully show the calendar when clicking on the button using property called alpha. To show a calendar I am doing

calendar.alpha = 5

To hide by clicking, I am doing

calendar.alpha = 0

This is just very simple thing.What I am looking for is some animation to show and hide calendar.

Here's some images

enter image description here

Above is the textfield and a button. When you click on a button, calendar will show like below enter image description here

Question :

How can I animate the effect such that it looks like when you are browsing the photo in your Album. If you dont like one of the photo you click a trash icon at the bottom right and the photo will slide into the a trash. So with this example, when I click on the button, I calendar will slowly show from a button and fully display onto the screen eventually

*Edit: I think the effect called suckEffect in iphone


Solution

  • That suck effect can't be done with Core Animation. To achieve that one, you would need OpenGL.

    While that would be a cool effect, it's probably not worth it. Though, I think you might want to add the tag 'opengl' to your question. That might draw the attention of some OpenGL developers who might be able to offer more specific suggestions.