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

Mockup & CodeGen, iPhone & iPad
($9.99)

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

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 04-19-2009, 01:28 AM   #11 (permalink)
Legrend
New Member
 
Join Date: Mar 2009
Location: Covina, California - United States
Age: 28
Posts: 22
Default

Quote:
But what you mention about the !done if statement, is this really necessary even if you are calling the 'setAnimationDidStopSelector' part in the core animation code?
I would only use the
Code:
 if (!done)
clause for infinite callbacks like yours. You're "setAnimationDidStopSelector" only calls another animation which then calls the previous one. So this looping will continue to occur forever, even if that screen is not technically visible.
EXAMPLE of not technically visible:
Code:
myScreen.hidden = true
The animation block is not being called infinitely, but the loop it makes between the second block is. So, animBlock A >> animBlock B >> animBlock A >> animBlock B >> etc. >> etc.

It will only stop for two reasons:

A) You remove the view controller that is handling these methods from the stack. IE. popScreen(). (I don't remember the exact syntax for that call.) or
B) you tell it to stop explicitly, by having one of the blocks NOT call the next, which you are not doing.

I just want to point out though, that this isn't really very processor heavy stuff, so even if you had to run this code constantly through you're app, I'm sure it'd be fine. I just wanted to point it out as a future reference.
Just from my programming habits, I've learned to NEVER code infinite loops. However, this is just my programming habits. So, it's just personal preference and really has no effect on output, I suppose.

Hope it's been helpful.
Legrend is offline   Reply With Quote
 

» Advertisements
» Online Users: 351
15 members and 336 guests
ADY, apatsufas, chemistry, Fit4him, headkaze, ilmman, MarkC, marto1914, Meoz, padsoftware, Promo Dispenser, Raffaello, tathaastu, tgjorgoski, Thrillhouse1919
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,877
Threads: 89,222
Posts: 380,718
Top Poster: BrianSlick (7,129)
Welcome to our newest member, peterkessler45
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 09:55 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.