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=mime-version:from:date:message-id:subject:to; bh=xj8kU+A5ByG/dPmmI6WHroMEMsVcw6MGRhYR8MF7k/I=; b=Qb8TFv253/NrfkZjlPFHN2uR6Ch3OI73ra4tNhrt/M03yepkVysTz8pjUjRPUTExZc aJE0vgfGW3nn917SJp2mkL8NdhoPx1ZlspiEQ/dqLC095rZ7ixjUU4BZtpktmS22ouu6 dfgQ5xJM1iz5S3WeqYaVmLMHr9RnBnpAL1vIqUVNlbQ2agxn3wM3EiFGWwiNAPrvDKjg XANm2GkEi1XCN6wqe+FdcTCdhQdxKm8phjPHorrsZOJF5zjIHuQ1SD1ooe5FE+VS8Pf7 24iB2BKZjCONffbz9oTlP5JRiDNBpYB/wJkqH2yHOANvwPl0S+F8UoUXiN97n5eHxWWn ol2w== I have a UI control that can be adjusted up and down using touch & drag. I've been asked to provide a control value based on how far the drag is via distance. So far so good. What my designer wants is a value change of every 20 pixels or so (control is 150px tall @ the moment) - so every 20 pixels = a change of 1. This will require multiple touch and drags but he's fine with it. The math is probably simple, but it's eluding me this morning. How can I easily convert my distance (I also have an increment Bool so I know whether it's addition or subtraction) to an appropriate value? Eric _______________________________________________ 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
participants (1)
-
Eric E. Dolecki