I want to create very long animation in iPhone (some visual tutorial). I know I can create animation using images but for long animation its not feasible. Any other idea?
Depending on what items you are trying to animate but from the sound of your post i think you best bet will be to actually make the animations in advance as movies and embed them into your app.
Related
I'm creating an app which would provide the user with a list of audio files and let them sample a small piece of audio when they select the song (just like the iTunes iOS app).
I love the way the iTunes iOS App has implemented it (image attached); wherein I can click on a cell and the album cover flips over to show a progress indicator and a stop button. I can select a cell and the sample starts to play, and the moment I stop it, the progress indicator flips back over to show the album/song art.
I'd like to create something like that for my app. Any suggestions on how I can go ahead with it.
Thanks a ton in advance! :D
EDIT: Based on Till's suggestion, I'm adding this edit. What I wish to get by asking this question is suggestions for the best approach to make the flip animation, showing a custom view in a UITableViewCell image space, possible. Currently, I'm not worried about playing the audio or displaying the progress of the playback. I simply need suggestions on the best approach to perform the flip animation and substitute the image with a custom UIView. :) Thanks again! :D
You will need to create it. I suggest making it as a custom tablecell. If you polish it well enought, you can put it on CodeCanyon and make it worth your while.
Also, I can recommend looking at the works on http://cocoacontrols.com/ - It might not have exactly this one, but it has many interesting controls and inspirations.
This is exactly what u looking for:
https://github.com/marshluca/AudioPlayer
You can also refer to some Sources :
https://github.com/lipka/LLACircularProgressView
I have to figure out the best way to transition from one video to the next
BASIC IDEA: An example would be that there is a video of a person walking.....the user taps the video and a seamless transition occurs to a video of a person running (over simplified example)
My first thought was to create 2 movie players and use transitions between the 2 view elements. But movie-player doesn't support that.
stopping the current video, loading new content, and then starting it is a solution but not very elegant. We are making a interactive sales tool for our reps and we want this to look as professional as possible.
CURRENT THOUGHT: If there was some sample code for AVPlayer, it would seem I could use AVVideoComposition to switch between videos? But details on how that might happen don't seem to be currently available.
POSSIBLE CLUE: I figured this would be easy as I bought an app called Live Cams HD that shows 16 different video feeds at once.
Any ideas? Thanks in advance!
Steve, the short answer is that you are not going to be able to get the kind of results you want using AVPlayer. The h.264 video logic included in iOS is really great at playing video and video/audio together, but it really sucks at starting/stopping and switching from one clip to another. The reason is that there is a lot of buffering that needs to happen to load up and start playing a h.264 video in hardware. Basically, you need to roll your own code that sets UIImage/CGImageRef for your views in a way that makes it easy to switch from one clip to another by simply switching from one array of UIImage objects to another. Of course, that is easy to say yet not so easy to implement.
What I would suggest is that you evaluate existing code that already implements this logic instead of rolling your own. For example, have a look at this StreetFighter demo app. It shows how a very simple game like iPhone UI can be constructed using a series of clips that show a character doing a kick, a punch, or throwing a fireball. The results looks like this:
I also wrote up a blog post about seamless-video-looping-on-ios. You can of course roll your own code to do all this, but I would suggest reading more about my library at the linked website as it will save you a lot of time.
After the first video has played every frame except the last one, you quickly swap to a view with an image of the last frame (basically the last frame) and then you transition into a view with the an image of the first frame of the next video and start up that one.
Or you could create a animation with all your frames (programming your videos), that will make it customizable, but the quality will probably not be as good and the cpu usage can spike, so you will have to make a call on that one.
How would you go about creating a timeline animation for an iPhone or iPad application? I'm looking for something like a timeline animation in Flash. I don't need a technical explanation on how to program it, though.
So here are some general questions:
- I read something about UIView for PNG sequences, but aren't these kind of animations resource intensive? And what about filesize? PNG can't be compressed like jpeg.
- What about vector-like animations? These would save a lot of kb's.
- Are there animation frameworks like TweenLite/TweenMax/Tweener/... (some well known frameworks for animations in ActionScript) ?
- Any good references on how to make animations (like Text animations, ...)
Thanks in advance.
Bart
Apple pretty much spells it out in Getting Started with Graphics and animation.
In general just stick with the highest possible API, and test to see if it's going to meet your needs or not. Moving around a UIView or UILabel (text) as in a Timeline Animation not only takes just a couple of lines of code but it will probably perform just fine.
This only just came out, but have you heard of Hirameki?
It's a flash animation parser that lets you drop SWF animations directly into Xcode projects for iPhone. A demonstration and beta sign up is here http://www.flash-on-iphone.com
I'll describe ways that I already know, and can do, and want to hear another suggestions, or may be even solutions :)
Create N frames of fire with semi-transparent pictures (PNGs)
Like at this site
Create pixel-based fire - line by line with shifting up. (not the best way I think)
Like here
Any other solutions?
Mr.doob's fire effect in flash is very clever.
Particles Fire Prototype by Nicolas Goles
Chapter 7 of iPhone Games Projects begins with a discussion of fire effects.
A movie with the fire animation playing, or maybe an animated .gif image.
You probably all know the famous virtual zippo app.
I thought of making such an app too, just for learning objective-c.
THe developer said he has used a video of flame.
How is it possible to play a video inside a UIView?
DO you have any ideas of how to achieving that?
Thanks in advance!
I don't know about a video inside a UIView, but you can use an UIImageView and animate a series of images with it. Here's how.