tranvutuan
tranvutuan

Reputation: 6109

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

Upvotes: 1

Views: 182

Answers (2)

Matt Long
Matt Long

Reputation: 24466

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.

Upvotes: 1

Manish Sharma
Manish Sharma

Reputation: 1720

one more thing value of opacity vary from 0-1 you are using 5 its ok but 1 is maximum.

you can also use jquery function like .show() , .hide() or .toggle() method for show hide your calender and animation http://api.jquery.com/category/effects/

Upvotes: 0

Related Questions