El siguiente código anima el movimiento, aunque no usé beginAnimations:context
. ¿Cómo hago para que se mueva sin animar? Este es un nuevo proyecto de vista de iphone, y estas son las únicas actualizaciones.Deshabilitar animación al mover CALayers
// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
- (void)viewDidLoad {
[super viewDidLoad];
sublayer = [CALayer new];
sublayer.backgroundColor = [[UIColor redColor] CGColor];
sublayer.frame = CGRectMake(0, 0, 100, 100);
[self.view.layer addSublayer:sublayer];
}
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event {
sublayer.position = [[touches anyObject] locationInView:self.view];
}
o 'setDisableActions: SÍ' – Sulthan