2012-07-03 1 views
0

이미지를 변환하는 동안 이미지의 크기를 조절하고 싶습니다. 같은 방법으로 처리 할 수 ​​있습니까?CGAffineTransform이 올바르게 작동하지 않습니다.

[UIView beginAnimations:annKey context:NULL]; 
    [UIView setAnimationDelegate:self]; 
    [UIView setAnimationDuration:duration]; 
    [UIView setAnimationCurve:curve]; 
    [UIView setAnimationBeginsFromCurrentState:YES]; 
    [UIView setAnimationDidStopSelector:@selector(animationFinished:finished:context:)]; 
    CGAffineTransform transform = CGAffineTransformMakeTranslation(x, y); 
    CGAffineTransform scale = CGAffineTransformMakeScale(xx, yy); 
    image.transform = scale; 
    image.transform = transform; 
    [UIView commitAnimations]; 

답변

0

당신은 규모를보기를 번역 CGAffineTransformConcat를 사용하여이 변환을 연결해야합니다. 현재 스케일 변환을 변환으로 대체하고 있습니다.

+0

[이 답변] (http://stackoverflow.com/a/3796238/573626) 예가 있습니다. 또한 [documentation] (http://developer.apple.com/library/ios/documentation/GraphicsImaging/Reference/CGAffineTransform/Reference/reference.html#//apple_ref/c/func/CGAffineTransformConcat)을 참조하십시오. – omz