我一直在研究 CGAffineTransforms,想知道是否有办法让您查看并放大 x、y 坐标。我使用以下功能缩小了比例:
CGAffineTransformMakeScale(4.00 ,4.00);
但是我不确定如何将缩放与可能的 x,y 坐标联系起来。有没有人做过这样的事情?我可能不正确地使用这些功能吗?
-(void)buttonSelected:(id)sender
{
UIButton *b = sender;
CGPoint location = b.frame.origin;
[UIView animateWithDuration:1.3f delay:0.0f options:UIViewAnimationCurveEaseIn animations:^{
CGAffineTransform totalTransform =
CGAffineTransformMakeTranslation(-location.x , -location.y );
totalTransform = CGAffineTransformScale(totalTransform, 4.0f, 4.0f);
totalTransform = CGAffineTransformTranslate(totalTransform, location.x , location.y );
[self.view setTransform:totalTransform];
}completion:^(BOOL finished) {
}];
}