我有一个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的结果:与此不同。 有人可以告诉我为什么吗?