Advertisement
Guest User

Untitled

a guest
Apr 20th, 2014
37
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. -(void)count {
  2. mainint -= 1;
  3. seconds.text = [NSString stringWithFormat:@"%i", mainint];
  4. }
  5.  
  6. -(IBAction)start:(id)sender {
  7. play.hidden = YES;
  8. mainint = 60;
  9. timer1 = [NSTimer scheduledTimerWithTimeInterval:1.0 target:self selector:@selector(count) userInfo:nil repeats:YES];
  10. if (timer1 == 0) {
  11. [timer1 invalidate];
  12. timer1 = nil;
  13. }
  14. }
  15.  
  16. -(void)count {
  17. mainint -= 1;
  18. seconds.text = [NSString stringWithFormat:@"%i", mainint];
  19. if (mainint == 0) {
  20. [timer1 invalidate];
  21. }
  22. }
  23.  
  24. -(void)count {
  25. mainint -= 1;
  26. seconds.text = [NSString stringWithFormat:@"%i", mainint];
  27.  
  28. if (mainint <= 0) {
  29. [timer1 invalidate];
  30. timer1 = nil;
  31. }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement