Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -(void)count {
- mainint -= 1;
- seconds.text = [NSString stringWithFormat:@"%i", mainint];
- }
- -(IBAction)start:(id)sender {
- play.hidden = YES;
- mainint = 60;
- timer1 = [NSTimer scheduledTimerWithTimeInterval:1.0 target:self selector:@selector(count) userInfo:nil repeats:YES];
- if (timer1 == 0) {
- [timer1 invalidate];
- timer1 = nil;
- }
- }
- -(void)count {
- mainint -= 1;
- seconds.text = [NSString stringWithFormat:@"%i", mainint];
- if (mainint == 0) {
- [timer1 invalidate];
- }
- }
- -(void)count {
- mainint -= 1;
- seconds.text = [NSString stringWithFormat:@"%i", mainint];
- if (mainint <= 0) {
- [timer1 invalidate];
- timer1 = nil;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement