site_archiver@lists.apple.com Delivered-To: cocoa-dev@lists.apple.com Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=teal.net; s=teal; h=references:to:cc:in-reply-to:date:subject:mime-version:content-type: message-id:from:from; bh=Bk8/p8xzMR/8c2EB0Ybsp530A3H/637MlEWueeUssHM=; b=FXaEzoHAj3QEVcFq83tf7dNBP0YawiZbGxkZSSDcxqTbHIUgDPLAVWznF3+6m3vF8cG2QIMI2ujIX CMWGbA4e51tAZtQVaVCtrLueb/s7VssmbKFL6Kv2iMHvGLEy2TmblwPHBqRzhuwlcR0IJLj+OUN+/W jEQnS20WBn3n9CGw= On Sep 18, 2018, at 06:15 , Eric E. Dolecki <edolecki@gmail.com> 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 (Cocoa-dev@lists.apple.com) 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: https://lists.apple.com/mailman/options/cocoa-dev/site_archiver%40lists.appl... This email sent to site_archiver@lists.apple.com