Xcode将图像缩放为0,然后返回到原始大小。
我对objective-c和一般的编码都是陌生的,我很难找到我正试图为程序编写的代码。我希望按下按钮时图像缩放到0,然后恢复到原始大小。到目前为止,我能够将其缩放到0,但我不知道如何将其恢复到原始大小Xcode将图像缩放为0,然后返回到原始大小。,xcode,uiview,Xcode,Uiview,我对objective-c和一般的编码都是陌生的,我很难找到我正试图为程序编写的代码。我希望按下按钮时图像缩放到0,然后恢复到原始大小。到目前为止,我能够将其缩放到0,但我不知道如何将其恢复到原始大小 -(void)rotate_imageview { [UIView animateWithDUration: 0.5 delay:0.0 options:UIViewAnimateOptionCurveLinear animations:^{
-(void)rotate_imageview
{
[UIView animateWithDUration: 0.5 delay:0.0 options:UIViewAnimateOptionCurveLinear
animations:^{
CGAffineTransform Scale = CGAffineTransformMakeScale(0, 0);
CGAffineTransform translate = CGAFffineTransformMakeTranslation(10.0, 10.0);
self.imageview.transform = CGAffineTransformConcat(scale, translate);
}
completion:^(BOOL finished) {
}];