Açıklama Yok

NSTimer+Addition.m 637B

123456789101112131415161718192021222324252627282930313233343536373839
  1. //
  2. // NSTimer+Addition.m
  3. // PagedScrollView
  4. //
  5. // Created by 陈政 on 14-1-24.
  6. // Copyright (c) 2014年 Apple Inc. All rights reserved.
  7. //
  8. #import "NSTimer+Addition.h"
  9. @implementation NSTimer (Addition)
  10. -(void)pauseTimer
  11. {
  12. if (![self isValid]) {
  13. return ;
  14. }
  15. [self setFireDate:[NSDate distantFuture]];
  16. }
  17. -(void)resumeTimer
  18. {
  19. if (![self isValid]) {
  20. return ;
  21. }
  22. [self setFireDate:[NSDate date]];
  23. }
  24. - (void)resumeTimerAfterTimeInterval:(NSTimeInterval)interval
  25. {
  26. if (![self isValid]) {
  27. return ;
  28. }
  29. [self setFireDate:[NSDate dateWithTimeIntervalSinceNow:interval]];
  30. }
  31. @end