views:

26

answers:

2

i want to play the audio file after the given period of time set by user.

+1  A: 

How about using the NSTimer class?

Andy West
can u give me some code by which i can start some action by using nstimer class
uttam
+1  A: 


You could use an NSTimer for this purpose like Andy Suggests but it may just over complicate things in this particular situation. More simply, you could implement something like this:

- (void)playSound {
  [sound play];
}

- (void)someMethod {
  float delay = 2.0; // seconds
  [self performSelector:@selector(playSound) withObject:nil afterDelay:delay];
}
imnk