Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/xcode/7.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Xcode将图像缩放为0,然后返回到原始大小。_Xcode_Uiview - Fatal编程技术网

Xcode将图像缩放为0,然后返回到原始大小。

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

我对objective-c和一般的编码都是陌生的,我很难找到我正试图为程序编写的代码。我希望按下按钮时图像缩放到0,然后恢复到原始大小。到目前为止,我能够将其缩放到0,但我不知道如何将其恢复到原始大小

 -(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) {
                    }];