Control image size with slider
I want to use a UISlider to control the size of an image. As you slide the
slider one way the UIImage above should grow and as you slide the other
way it should shrink. The ratio should stay the same. The math should be
something like slider value = width, and height = (height/width ratio) *
slider value. The way I think this could be done would be by making a
variable and setting that variable to the image size and then making that
variable = the slider value but I am not experienced with this sort of
programming and do not know where to start. I found this question but I am
not sure how to implement its code. Any point in the right direction, even
just a conceptual explanation so I know how to write the code, is
appreciated.
No comments:
Post a Comment