摘要:
CABasicAnimation *shake = [CABasicAnimationanimationWithKeyPath:@"transform.translation.x"];//transform.translation.x 设定动画类型,方向,eg:旋转,平移,缩放, from,to shake.fromValue = from; // 从哪里 shake.toValue = to; // 到哪里 shake.byValue = by; // 偏移 shake.speed = 8; // 正常速度的 n倍 shake.autoreverses = YES;//是 阅读全文