Skip to content

Instantly share code, notes, and snippets.

@samdmarshall
Created July 22, 2012 19:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save samdmarshall/3160728 to your computer and use it in GitHub Desktop.
Save samdmarshall/3160728 to your computer and use it in GitHub Desktop.
float value = (slider.value - slider.minimumValue);
float px_per_val = (slider.frame.size.width)/(slider.maximumValue - slider.minimumValue);
float position = (px_per_val * value) + 20;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment