步骤:1 new Handler().postDelayed(new Runnable() {
@Override
public void run() {
File file = new File("/sdcard/Pictures/" +myFileName);
long size = file.length();
if (size == 0){
if (file.delete()) {
Log.d(TAG, "delete success");
} else {
Log.d(TAG, "fail delete");
}
}
}
}, 20000);
}
// Add Gestures
步骤:2
旋转和缩放图像。
步骤:3
UIRotationGestureRecognizer *rotateGesture = [[UIRotationGestureRecognizer alloc] initWithTarget:self action:@selector(rotationGestureDetected:)];
UIGestureRecognizerState state = [recognizer state];
if (state == UIGestureRecognizerStateBegan || state == UIGestureRecognizerStateChanged)
{
CGFloat rotation = [recognizer rotation];
[recognizer.view setTransform:CGAffineTransformRotate(recognizer.view.transform, rotation)];
[recognizer setRotation:0];
}
结果:图像已拉伸