Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Tutorials > Tutorial Requests

Reply
 
LinkBack Thread Tools Display Modes
Old 07-06-2010, 01:33 PM   #1 (permalink)
justdan
 
Join Date: Jan 2009
Location: Dallas
Posts: 38
justdan0227 is on a distinguished road
Default Flip-Clock Animation Tutorial

Does anyone have a snippet of code that would simulate the animation of a UIImage (aka digits of a flip clock) without having to provide an array of flip animation images using Core Animation?
justdan0227 is offline   Reply With Quote
Old 09-21-2010, 01:28 PM   #2 (permalink)
Registered Member
 
Join Date: Mar 2010
Location: Mexco
Posts: 2
gerardoqm is on a distinguished road
Send a message via MSN to gerardoqm Send a message via Skype™ to gerardoqm
Default Flip clock found!!!

Here is a good one, I was looking for the same effect for one of my apps. Hope it helps !!!

Creating an iPad flip-clock with Core Animation
gerardoqm is offline   Reply With Quote
Old 10-01-2010, 07:55 AM   #3 (permalink)
Registered Member
 
SundialSoft's Avatar
 
Join Date: Oct 2010
Location: Scotland
Posts: 176
SundialSoft is on a distinguished road
Default

Quote:
Originally Posted by justdan0227 View Post
Does anyone have a snippet of code that would simulate the animation of a UIImage (aka digits of a flip clock) without having to provide an array of flip animation images using Core Animation?
The method mentioned in the first reply is very nice. I have used a different approach as the other method is beyond my current knowledge and the chap did not provide enough source to make it all clear. I have the static clock face images for each number and I build a small array of frames using code I got from a web sample to draw the image in a smaller frame using a rect. I found that 5 frames was enough to get a good effect. The hardest part was working out how to get the bottom flip animating after the top flip. I ended up using a timer as the setAnimationDidStopSelector approach which works for UIViews does not work for UIImageviews (or at least I could not get it to work). My guess is that the other method is more elegant but I have mine working now so I will stick with it.
SundialSoft is offline   Reply With Quote
Old 10-05-2010, 01:46 PM   #4 (permalink)
Registered Member
 
Join Date: Mar 2010
Location: Mexco
Posts: 2
gerardoqm is on a distinguished road
Send a message via MSN to gerardoqm Send a message via Skype™ to gerardoqm
Default

Could you share the coded/project you used to animate in that way (5 frames per number change)??
gerardoqm is offline   Reply With Quote
Old 12-29-2010, 11:27 PM   #5 (permalink)
Registered Member
 
yguler's Avatar
 
Join Date: Dec 2010
Location: toronto, ontario
Posts: 12
yguler is on a distinguished road
Default

Quote:
Originally Posted by gerardoqm View Post
Could you share the coded/project you used to animate in that way (5 frames per number change)??
check this site it will help


LostoClockViewController.m - idharmaclock - Project Hosting on Google CodeLostoClockViewController.m - idharmaclock - Project Hosting on Google Code
yguler is offline   Reply With Quote
Old 01-12-2011, 08:15 AM   #6 (permalink)
Registered Member
 
SundialSoft's Avatar
 
Join Date: Oct 2010
Location: Scotland
Posts: 176
SundialSoft is on a distinguished road
Default

Quote:
Originally Posted by gerardoqm View Post
Could you share the coded/project you used to animate in that way (5 frames per number change)??
Sorry for the late reply. Christmas, new year etc got in the way. Yes I can put up a code snippet (when I get to my Mac) but my code is not perfect as I'm new to objective C & XCode. I take one image & make 5 shrunken versions of it at different stages of the flip.

The other methods which take a single image & transform it produce much smaller code & I'm re-coding my flip clock to work that way to see which I prefer. Performance & memory leak avoidance are the important things to me.

The link to the russian? example shows code which concatenates transforms so it's worth looking at.

Cheers

Ian
SundialSoft is offline   Reply With Quote
Old 03-03-2011, 09:03 AM   #7 (permalink)
Registered Member
 
SundialSoft's Avatar
 
Join Date: Oct 2010
Location: Scotland
Posts: 176
SundialSoft is on a distinguished road
Default

Believe it or not I have only just debugged my code to the point where I would not be doing damage to others by releasing a snippet. If anyone still wants to know this approach let me know. I use images of the flip clock numbers (originals from a web post of a java flip clock) and for each flip I create 5 frames for the top half, five for the bottom half, plus the images in back which reveal the next number. Being new to ios I had to learn memory management & debugging in xcode to the point where I could remove rampant memory syndrome from my app. I can post a snippet of the whole bit that shrinks the images but not the whole app as it's not just a flip clock.

ps: I prefer my approach as it allows for more than one set of images so changing the look of the clock.
SundialSoft is offline   Reply With Quote
Old 03-15-2011, 01:36 AM   #8 (permalink)
Registered Member
 
Join Date: Oct 2009
Posts: 3
doudou974 is on a distinguished road
Default flipClock

Quote:
Originally Posted by SundialSoft View Post
Sorry for the late reply. Christmas, new year etc got in the way. Yes I can put up a code snippet (when I get to my Mac) but my code is not perfect as I'm new to objective C & XCode. I take one image & make 5 shrunken versions of it at different stages of the flip.

The other methods which take a single image & transform it produce much smaller code & I'm re-coding my flip clock to work that way to see which I prefer. Performance & memory leak avoidance are the important things to me.

The link to the russian? example shows code which concatenates transforms so it's worth looking at.

Cheers

Ian
Hi, I'm very interesting about your method, do you have a sample project to share?
Thanks,
doudou974 is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Stats
Members: 175,696
Threads: 94,139
Posts: 402,961
Top Poster: BrianSlick (7,990)
Welcome to our newest member, jasper_muc
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 02:02 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0