lamfan Posted August 3, 2008 Share Posted August 3, 2008 I had start develop a iphone mini game, is there anyway to import multi images for animation? Link to comment Share on other sites More sharing options...
stroke Posted August 3, 2008 Share Posted August 3, 2008 You could use an NSTimer and change the image every interval. Link to comment Share on other sites More sharing options...
lamfan Posted August 4, 2008 Author Share Posted August 4, 2008 that will be difficult, If I want the animation running smoothly, then I need to declear lot of UIView, is there any framework support for animation in xcode? Link to comment Share on other sites More sharing options...
stroke Posted August 4, 2008 Share Posted August 4, 2008 Just create a GIF from them and put them into an imageview, then. And you wouldn't need to create different views with the NSTimer method, you would just need one UIImageView and continuously call setImage: to give it the new image. Link to comment Share on other sites More sharing options...
alloutmacstoday Posted August 4, 2008 Share Posted August 4, 2008 Yup, there is an easy way to do this. Use UIViews' animation stuff In developer documentation, lookup "setAnimationBeginsFromCurrentState:" all the uiview animation stuff will be there too Stroke: If you are making a game, having a gif is pointless; it will always display the same thing; you cannot choose how to move it. Link to comment Share on other sites More sharing options...
lamfan Posted August 5, 2008 Author Share Posted August 5, 2008 Just create a GIF from them and put them into an imageview, then. And you wouldn't need to create different views with the NSTimer method, you would just need one UIImageView and continuously call setImage: to give it the new image. thanks I will try to use what you say, specially setImage! Yup, there is an easy way to do this. Use UIViews' animation stuff In developer documentation, lookup "setAnimationBeginsFromCurrentState:" all the uiview animation stuff will be there too Stroke: If you are making a game, having a gif is pointless; it will always display the same thing; you cannot choose how to move it. I had try to read the documentation about setAnimationBeginsFromCurrentState, but I can't find out how to load other images inside, it only work on a single image animation. Do I miss something? Link to comment Share on other sites More sharing options...
alloutmacstoday Posted August 5, 2008 Share Posted August 5, 2008 Hmm. I dunno I've never really used OpenGL before, but that may be one of the solutions. That or Quartz. Quartz would be the easiest or even core graphics. Apple has great documentation on all of these Link to comment Share on other sites More sharing options...
lamfan Posted August 5, 2008 Author Share Posted August 5, 2008 Hmm. I dunno I've never really used OpenGL before, but that may be one of the solutions. That or Quartz. Quartz would be the easiest or even core graphics. Apple has great documentation on all of these Thanks I will check it! Link to comment Share on other sites More sharing options...
stroke Posted August 5, 2008 Share Posted August 5, 2008 AllOutMacsToday, that is for control animation — eg, changing the properties of a certain UIView, or whatever. Link to comment Share on other sites More sharing options...
Recommended Posts