I’m new and apologize upfront. I’ve searched for sample code and tutorials on the web but haven’t found any that answer my question.
I have an array of images for a UIImageView and wanted to be able to use a slider to go between the images back and forth according to the slider.value
Any suggests will be appreciated.
a quick recipe would go something like this:
a) add a slider to a view controller – either in code or in interface builder.
b) make sure to assign and connect a property to the slider
c) set the min value to 0 and the max value of the slider to the count of your photo array
d) have the slider action target an action or method (connect it – ctrl drag, etc)
e) convert the slider value from a float to an int value
f) grab the image at the location in the array that the slider value points to
g) set the image
so something like this, I’m assuming you used interface builder and wired the slider to
a property called slider and an ibaction called showPicture and that you have a UIImageView called photoView and a photo array called photoArray.
something along those lines should do the trick.
be well