How do I make animations in an iPad app?
-
I'm developing this application on the iPad. I want to make nice animations so that i can beautify my application. For example, there's 4 main buttons/images in a view. When i tap on one of them, a few more buttons/images will branch out. It's like the 'parent button' will branch out to few 'child buttons'. May i know how to do these kind of animations? Any good references or code snippets for me to refer? Thanks.
-
Answer:
A good stating point would be the Core Animation demo's here: https://github.com/neror/CA360 Run them in the sim and checkout the code that creates the magic. UIView animations would also be suitable for your example, and are a little easier to implement. Nice tutorial here: http://www.raywenderlich.com/2454/how-to-use-uiview-animation-tutorial
Lloydworth at Stack Overflow Visit the source
Other answers
Search on the term "Core Animation iOS" on your favorite search engine. You'll find information from Apple's Developer Central site, particularly the https://developer.apple.com/library/ios/#documentation/Cocoa/Conceptual/CoreAnimation_guide/Introduction/Introduction.html#//apple_ref/doc/uid/TP40004514 and https://developer.apple.com/library/ios/#documentation/GraphicsImaging/Conceptual/CoreAnimation_Cookbook/Introduction/Introduction.html#//apple_ref/doc/uid/TP40005406.
Alex Reynolds
There are actually 2 main methods. One is to use Core Animation, if it contains your desired path and animation. The other is to use an animation game loop, where the app periodically calls a routine to redraw the view every frame time. An NSTimer or CADisplayLink can periodically (say at 24 or 30 or 60 Hz) call a routine doing a setNeedsDisplay, which then causes the view's drawRect to be called, etc. The some other periodic code can change some state (moving some X Y button positions, etc.) during or between each frame to provide the appearance of movement or other animation effect, when the view is redrawn. Or OpenGL can be used to redraw some animated 3D world as things move. You can even have each frame change in response to user input. This is the most flexible way to animate, and allows you to customize animations in ways that are impossible for Core Animation, but it uses more power and can be so CPU intensive as to be a lot slower than Core Animation as well.
hotpaw2
Related Q & A:
- I have a blog how can I make money with it.Best solution by Yahoo! Answers
- How do I make some some money before I land a real job that's related to my Degree?Best solution by wikihow.com
- How do i make a signature for when i send an email?Best solution by Yahoo! Answers
- How do I increase font size in Mac App Store?Best solution by Ask Different
- How can I make clay use to make things?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.