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

sdkIQ for iPhone
($4.99)

Your First iPhone App
($1.99)

iPhone Code Generator
($9.99)

Dual Matches
($0.99)

Calcuccino Programmers' Calculator
($2.99)

SDKtoday
(free)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 07-10-2009, 06:23 PM   #2 (permalink)
smasher
Senior Member
iPhone Dev SDK Supporter
 
smasher's Avatar
 
Join Date: Jul 2008
Location: San Mateo, CA (San Fran)
Posts: 3,070
Default

The "selector:" parameters expects a selector, which you need to get with the "@selector" directive. Try this:

Code:
timer = [NSTimer scheduledTimerWithTimeInterval:1.0
     target:self
     selector:@selector(countDown)  // I added @selector() here
     userInfo:nil repeats:YES];
Also, you want "if (time == 0)" not "if (timer == 0)" . You want to check your counter, not the timer object.
__________________
~~
-- Available Now: Dead Panic, a strategic zombie shooter!(iPhone)
-- New Blog Post: A Simple Observer Pattern for iPhone / Cocoa Games
smasher is offline   Reply With Quote
 
» Advertisements
» Online Users: 368
22 members and 346 guests
AdamSubach, anonymous@, bajumuslimah8, Duncan C, gtyt38, Jeremy1026, lifeCoder45, maxus182, mickm, mox, Mr. Mojo Risin, Olesesy, Ovidius, Paul10, squidboy, tiptoeprint, ufbobbo, ultrayard077, wuf810
Most users ever online was 965, 06-30-2010 at 04:26 AM.
» Stats
Members: 41,859
Threads: 49,768
Posts: 213,052
Top Poster: BrianSlick (3,138)
Welcome to our newest member, ultrayard077
Powered by vBadvanced CMPS v3.1.0

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