0

My intention is to 'learn while doing' to create an airplane approaching from a distance, that is on a roller-coaster-like path. It will begin in the distance (small & unrecognizable) and end/stop begin able to read a message/greeting on a window or center of the engine spinner for instance.

At this time, I think the frameworks for doing this are:

  • UIKit
  • Core Animation
  • Open GL ES
  • Core Graphics

What is the highest level that this is possible? Would a higher level be possible if the plane's path came straight? Is there another framework that could be used? (I've read about cocos2d, but prefer to first learn apple's.)

David
  • 3,285
  • 1
  • 37
  • 54
  • Just noting, this is probably a good question for your own research. This question is not compliance with the guidelines of StackOverflow. Please have a quick look at http://stackoverflow.com/faq#dontask – Byte Apr 30 '12 at 14:45
  • You can look at the question from either side. I am asking for a simple 1,2,3... Start here, then learn about x, then look at y. A specific answer (if you can see the desired project) would be great for this forum (imo). – David Apr 30 '12 at 15:18
  • There are many approaches to animation on iOS, so selecting the right approach is half the battle. You should start by learning about the different approaches, their capabilities, and limitations. The tutorials in my answer below cover several approaches (UIView animations, GL, etc...) – HackyStack Apr 30 '12 at 15:29
  • OK. So the answer starts with 'Approaches'. Can you suggest one approach and possible steps you'd take with an idea like this? Then, I can know a specific place to research. – David Apr 30 '12 at 15:38
  • 1
    While I know that you're unsure about where to start, I think you'll need to further clarify the effect you're trying to accomplish here, because I'm still not sure what you're trying to do. For example, if all you want to do is display your airplane as a static image and simply zoom in on it, that is trivial for Core Animation to do (or even with simple UIView animations). Look for examples of animation image scaling or translation in that case. However, if you want to generate a three-dimensional plane, you'll need to step up to OpenGL ES or an engine that wraps this API. – Brad Larson May 01 '12 at 19:14
  • @Brad Larson That is exactly what I was looking for. Either is a possibility for this (learning) project. Can you make that an answer? (I've appealed to have question reopened with last edit) And possibly include a few specifics for OpenGL ES like you gave for CA? I'll start with the scaling and translation. – David May 01 '12 at 22:19
  • @Brad Larson Disregard. I found your post on [How do I apply a perspective transform to a UIView](http://stackoverflow.com/questions/347721/how-do-i-apply-a-perspective-transform-to-a-uiview/353611#353611) That says enough. – David May 01 '12 at 22:29
  • OpenGL ES is an incredibly broad subject by itself, so I can't provide any easy pointers there. I did teach classes on Core Animation and OpenGL ES, though, and they're available on iTunes U for free: http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewCourse?id=497193807&s=143441&ls=1 if you want to see some of this in action. That might help you provide a little more specific framing for what you want to animate. – Brad Larson May 01 '12 at 22:29

3 Answers3

1

Ray Wenderlich has some good beginning tutorials for iOS including some basic animation ones.

Check these out: http://www.raywenderlich.com/tutorials

It'd be a good place to start...

HackyStack
  • 4,887
  • 3
  • 22
  • 28
1

There's a new "Animating Images" capability in UIImage. A discussion starts at 16:33 in the WWDC 2011 video: What's New in Cocoa Touch?

This would be similar to providing your application with an 'animated gif', by including only the series of images. No need to create the actual gif.

That allows you to create dynamic images. Then, to animating those (or static images) even further (such as moving them around the screen, sizing them, or changing their alpha translucency), check out the Core Animation WWDC videos and guide:

WWDC 2010

Core Animation Essentials Video

As well as the Core Animation Guide

Bobjt
  • 4,040
  • 1
  • 29
  • 29
  • Of course, the WWDC programs are alot of excitement (cheerleading). That said, the Part 2 video is way over-the-top difficult. Collectively, these examples **did** help give direction to beginning the journey. – David May 05 '12 at 21:52
  • 1
    After starting with Core Animation, know that UIView exposes an API for animating views (View Animation Blocks) and it simply uses Core Animation API's behind the scenes to implement it. See the "Animations" section of the View Programming Guide for more info: http://developer.apple.com/library/ios/documentation/WindowsViews/Conceptual/ViewPG_iPhoneOS/AnimatingViews/AnimatingViews.html – Bobjt May 07 '12 at 19:08
0

Are you after 2D or 3D animation? If you want 2D, Core Animation is the obvious choice. Core Animation is very powerful, but the Apple documentation is vague at best. The Marcus Zarra Core Animation book is good, but doesn't cover much iOS specific animation code. Both it and the Bill Dudney Core Animation books are in need of updates. Both are worth owning, but both need to be updated and their iOS sections need to be greatly expanded.

If you want 3D animation, with perspective, then OpenGL is about your only choice. OpenGL is a bear to learn however.

Duncan C
  • 128,072
  • 22
  • 173
  • 272