UIScrollView에서 zoomScale을 다시 1로 설정해야하지만 애니메이션이 필요합니다. 나는 이것을 위해 CABasicAnimation을 사용할 수 있다고 생각했지만 NSValue는 "valueForFloat"또는 "valueForNSNumber"를 가지지 않으므로 CABasicAnimation의 animation.fromValue 및 animation.toValue에 사용할 항목을 모르겠습니다. 이 문제를 해결할 더 좋은 방법이 있습니까?UIScrollView에서 zoomScale을 애니메이션하는 방법
편집 :이 기능을 추가하려면 무엇을 추가해야합니까?
CABasicAnimation *animation = [CABasicAnimation animationWithKeyPath:@"zoomScale"];
animation.duration = 2.3;
animation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionLinear];
animation.fromValue = [NSNumber numberWithFloat:myScrollview.zoomScale];
animation.toValue = [NSNumber numberWithFloat:1.0];
[myScrollview.layer addAnimation:animation forKey:@"zoomScale"];
시도는있는 ScrollView에없는 애니메이션 뷰에 애니메이션을 추가 할 수 있습니다. – danypata