NSTimer奇怪的行为

时间:2013-11-28 16:38:23

标签: ios animation nstimer

我有一个NSTimer,当我调用一个方法或尝试使用计时器触发该方法时,我得到了不同的结果。

NSTimer *timer = [NSTimer timerWithTimeInterval:animationStepDuration
                                         target:self
                                       selector:@selector(handleAnimation:)
                                       userInfo:[NSDictionary dictionaryWithObjectsAndKeys:
                                                 [NSNumber numberWithFloat:newScale], @"scale",
                                                 [NSValue valueWithCGPoint:offsetToCenter], @"offset",nil]
                                        repeats:NO];
[[NSRunLoop mainRunLoop] addTimer:timer forMode:NSRunLoopCommonModes];

handleAnimation的结果:与此不同。 有人可以告诉我为什么吗?

0 个答案:

没有答案