If I apply a transform to a view, then the movement of the view on the iPad Air is delayed. It looks like an implicit animation in CALayer. I created a test project . It must be performed on an iPad simulator. This is the code I use to apply the transforms:
CGAffineTransform transform = CGAffineTransformIdentity;
if (_transformSwitch.on)
{
transform = CGAffineTransformRotate(CGAffineTransformMakeScale(2.0, 2.0), M_PI / 3.0);
}
self.frameView.transform = transform;
This is the code I use to move the move:
CGPoint transition = [_panRecognizer translationInView:self.view];
CGPoint newCenter = CGPointMake(_startCenter.x + transition.x, _startCenter.y + transition.y);
self.frameView.center = newCenter;
How can I move a view using applied transforms and avoid animation?
UPD
I found a solution for moving around the timer call, but if I move the frame with my finger, I have problems with the animation. I set the view center by wrapping it with [CATransaction begin] [CATransaction commit]:
[CATransaction begin]
[CATransaction setValue:@(YES) forKey:kCATransactionDisableActions]
_destinationIndicatorView.center = center;
self.frameView.center = center;
[CATransaction commit]
, , ?
setNeedsDisplay, . ( - drawRect setNeedsDisplay , ):
[CATransaction begin]
[CATransaction setValue:@(YES) forKey:kCATransactionDisableActions]
_destinationIndicatorView.center = center;
[self.frameView setNeedsDisplay]
self.frameView.center = center;
[CATransaction commit]
.
UPD2
iPad (, iPad Air). , : https://yadi.sk/i/rAneCEFmjjEej