Disable animation when moving CALayers

后端 未结 2 849
南方客
南方客 2021-01-18 02:15

The following code animates the movement, even though I didn\'t use beginAnimations:context. How do I get it to move without animating? This is a new iphone vi

2条回答
  •  攒了一身酷
    2021-01-18 03:14

    More simplest way:

    sublayer.position = [[touches anyObject] locationInView:self.view];
    [sublayer removeAnimationForKey:@"position"];

提交回复
热议问题