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

Implementing 3D-Touch #57

Open
enstulen opened this issue Jun 30, 2016 · 2 comments
Open

Implementing 3D-Touch #57

enstulen opened this issue Jun 30, 2016 · 2 comments

Comments

@enstulen
Copy link

enstulen commented Jun 30, 2016

I want to implement 3D-Touch and change the linewidth based on the pressure.
In the touchesMoved I use this code to change the lineWidth:

    CGFloat maximumPossibleForce = touch.maximumPossibleForce;
    CGFloat force = touch.force;
    CGFloat normalizedForce = force/maximumPossibleForce;
    CGFloat lineWidth = normalizedForce * 10;
    self.currentTool.lineWidth = lineWidth;

It works, however, when crossing lines with a previously drawn line, it overrides it.
If anyone knows a solution I would greatly appreciate it! Thanks :)

@enstulen
Copy link
Author

Picture:
asset

@BlaXun
Copy link

BlaXun commented Jul 18, 2016

I got a similar problem when rotating the view.... I also get such annoying fragments :S

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

2 participants