Tôi đang tạo hiệu ứng động một cái nhìn UIImage
với mã nàyCATransform3DRotate và UIImageView
CABasicAnimation *animation;
animation = [CABasicAnimation animationWithKeyPath:@"transform.rotation"];
animation.duration = 1;
animation.toValue = [NSNumber numberWithFloat:M_PI];
animation.fromValue = [NSNumber numberWithInt:0];
[square.layer addAnimation:animation forKey:@"rotation"];
Tất cả hoạt động tốt nhưng mảng của tôi có vị trí ban đầu của mình ở phần cuối của phim hoạt hình. Tôi nhìn vào các thuộc tính lớp và thấy:
[square.layer setTransform:CATransform3DRotate(HERE, -M_PI, 0, 0, 0)];
Và tôi không biết phải viết thay vì "HERE". Bạn có thể vui lòng giúp tôi không? Cảm ơn rất nhiều!
Thnaks rất nhiều Brad! – Pierre