Quote:
Originally Posted by simplyDusty
Use the button's pressed event to start an NSTimer that triggers a method every second for two minutes. In that method update your label and play your sound.
Code:
NSTimer *timer;
int seconds;
-(IBAction)buttonPressed:(id)sender
{
timer = [NSTimer timerWithTimeInterval:1.0
target:self
selector:@selector(Update:)
userInfo:nil
repeats:YES];
}
-(void)Update
{
// update your label
// play your sound
seconds++;
if (seconds > 120)
{
[timer invalidate];
timer = nil;
}
}
Something like that would probably work. May be some errors...
|
unfortunately does not work or might not get it to work.
The operation that I want is simply the fact
and a countdown showing the time UILabel. And then
every second for a sound.
Thanks