Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Jul 10, 2011, 04:01 PM   #1
vodouman
macrumors regular
 
Join Date: Mar 2008
Location: London
Timers in Obj-C

Hi guys

Just started programming in Obj-C.

I wanted to make a Tetris style game to test my ability before I develop a unique game for sale in the App Store.

If I generated a 2d block at the top of the screen with core graphics would I be able to set a timer which will allow the user to move the block left and right but then every X amount of seconds will move the block down.

I was just worried that an attempt to implement this would result in the program pausing for X seconds and ignoring user input and would then accept input after the timer had run down.

I want a timer to trigger a move down yet still enable left and right movement.

Thanks,

- Vodouman
__________________
27" Aluminium iMac, 2.93GHz i7, 12GB RAM, 2 TB HDD; (Retired.)

27" Aluminium iMac, 3.2GHz i5, 8GB RAM, 3 TB Fusion Drive;
vodouman is offline   0 Reply With Quote
Old Jul 10, 2011, 04:04 PM   #2
robbieduncan
Moderator
 
robbieduncan's Avatar
 
Join Date: Jul 2002
Location: London
Look at NSTimer.
robbieduncan is offline   0 Reply With Quote
Old Jul 10, 2011, 04:06 PM   #3
vodouman
Thread Starter
macrumors regular
 
Join Date: Mar 2008
Location: London
Quote:
Originally Posted by robbieduncan View Post
Look at NSTimer.
Ahhh perfect. Much appreciated sir
__________________
27" Aluminium iMac, 2.93GHz i7, 12GB RAM, 2 TB HDD; (Retired.)

27" Aluminium iMac, 3.2GHz i5, 8GB RAM, 3 TB Fusion Drive;
vodouman is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
FYI: 2013 MacBook Air drops separate Display/System sleep timers. hubertheryan MacBook Air 38 Aug 24, 2014 03:39 PM
All iPads: 1st Timers, how are you liking your iPad? Blakjack iPad 4 Nov 17, 2013 07:57 AM
Timers in Lockscreen Extcee iOS 7 14 Jun 17, 2013 08:56 PM

Forum Jump

All times are GMT -5. The time now is 10:38 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC