Advertise Books Events Forum News Social Networking Support Us

sdkIQ for iPhone
($4.99)

Shape Up
($0.99)

Your First iPhone App
($1.99)

iVidCam Free
(free)

Kid Art
($0.99)

iPUBQUIZ
(£1.19)

ArtStudio
($3.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 04-25-2009, 07:16 PM   #1 (permalink)
will.ray
Registered Member
 
Join Date: Mar 2009
Posts: 161
Default proper use of nstimer...

I just want to implement a small delay.. so is it "ok" to do the following?

Code:
[NSTimer scheduledTimerWithTimeInterval:2 target:self selector:@selector(timerUpdate) userInfo:nil repeats:NO];
		
while(!done);  //wait here until timerUpdate sets flag to done..

//continue program..
Ok, basically I am setting up the timer, but all I want is to delay, so I loop until the timerUpdate function sets the 'done' property..

can i loop like that? is that "ok"? thx
will.ray is offline   Reply With Quote
 
Enter the iPhone App Challenge!  Win $500!
» Advertisements
» Online Users: 282
18 members and 264 guests
acmecorps, alex_ivanov, darrenmj, dmerat, DonomaGames, dvaii, Erythema, ianian, iGeorG, jyu, kmadhukishore, Lokendra, markdude, oldmicah, Pilly170, refreshe, robertsechenfen, Rossco
Most users ever online was 779, 05-11-2009 at 09:55 AM.
» Stats
Members: 24,238
Threads: 39,016
Posts: 171,113
Top Poster: smasher (2,570)
Welcome to our newest member, Erythema
Powered by vBadvanced CMPS v3.1.0

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