• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: touchesMoved value setting
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: touchesMoved value setting


  • Subject: Re: touchesMoved value setting
  • From: Eric Dolecki <email@hidden>
  • Date: Tue, 18 Sep 2018 18:51:49 +0000
  • Thread-topic: touchesMoved value setting

Ahhh thanks!!

The distance is being accumulated appropriately.

Sent from my iPhone X.

________________________________
From: Quincey Morris <email@hidden>
Sent: Tuesday, September 18, 2018 10:33 AM
To: Eric E. Dolecki
Cc: Cocoa Dev
Subject: Re: touchesMoved value setting

On Sep 18, 2018, at 06:15 , Eric E. Dolecki
<email@hidden<mailto:email@hidden>> wrote:

Once the distance number gets high enough, I start to get tVal values of 2,
3, 4, etc. I think my logic is messed up here.

Yes, it’s messed up. Instead of this:

   currentValue = currentValue ± tVal

you need this:

   currentValue = originalValue ± tVal // original value at time of touchesBegan

and ‘distanceValue’ has to be the *accumulated* distance since the
touchesBegan. Trying to do this using the distance moved since the last
touchesMoved is wrong.

BTW, I think it’s easier to use a UIPanGestureRecognizer.

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >touchesMoved value setting (From: "Eric E. Dolecki" <email@hidden>)
 >Re: touchesMoved value setting (From: Richard Charles <email@hidden>)
 >Re: touchesMoved value setting (From: "Eric E. Dolecki" <email@hidden>)
 >Re: touchesMoved value setting (From: Quincey Morris <email@hidden>)

  • Prev by Date: Re: XPC Question
  • Next by Date: Re: XPC Question
  • Previous by thread: Re: touchesMoved value setting
  • Next by thread: Typing with multiple selections in NSTextView
  • Index(es):
    • Date
    • Thread