Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can i translate an image after image rotation #3

Open
rajatmohanty opened this issue Nov 3, 2011 · 0 comments
Open

How can i translate an image after image rotation #3

rajatmohanty opened this issue Nov 3, 2011 · 0 comments

Comments

@rajatmohanty
Copy link

I am able to do rotation by using single finger but when i tried to translate the images by using double that are not moving.

I am using this below code for translation but after implementation of KTOneFingerRotationGestureRecognizer code, image are not translating.

  • (void)translate:(UIPanGestureRecognizer *)gesture {
    if ((gesture.state == UIGestureRecognizerStateChanged) ||(gesture.state == UIGestureRecognizerStateEnded))
    {

    CGPoint translation = [gesture translationInView:self];
    self.transform = CGAffineTransformTranslate(self.transform, translation.x, translation.y);
    [gesture setTranslation:CGPointZero inView:self];

    }

}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant