site_archiver@lists.apple.com Delivered-To: cocoa-dev@lists.apple.com Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:thread-topic:thread-index:date:message-id :references:in-reply-to:accept-language:content-language :mime-version; bh=yhzdtNZiBiz60IVmGX87Mtk0ETENQaV9mZVPZfCVISg=; b=BrYx+DSVzAgXMMW0xpHwr7aAieigc06pmAaBqPaSIWvSiOA1OkYzweJ1lQPEWV87Yn Xun/d2f2u1f5tfoO97NkVFRdb/aLAyor5VJ4wn/Imx4gYOsNihsMOlH3JYKfKa1MtnM5 Gvf+lX5QYE0g0heyA93YqY3T9HLqmjc+dZ7KcGTRk9efAs0QkGhVtClICiRXL7baY+v0 Kpx++H2WU7D3dL/FJcuupDep5DnOm+EvxP6+LDHbjw2XJLNvzpLPZKjB9W6gCSqAqxDM hm08T64qpYLp30UWTpH8azfhVOyS8Cii+0SkYqZXyH1RsRjIrFgS8fUtfvsb8YGooXDN jbag== Thread-index: AUFSWlY02IdxXRXxuuiVqukn7XT4VTkxMzRBQTNUK3U1MDM0NKB9poi8 Thread-topic: touchesMoved value setting Ahhh thanks!! The distance is being accumulated appropriately. Sent from my iPhone X. ________________________________ From: Quincey Morris <quinceymorris@rivergatesoftware.com> 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 <edolecki@gmail.com<mailto: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