hi,
i have 50 images which i want to connect with slider. i want to view one image at a time. is this possible?
hi,
i have 50 images which i want to connect with slider. i want to view one image at a time. is this possible?
Yes,
The most simplest way is creating a NSArray with 50 images in it. The slider has a range from 0 to 49 and that slider refers to the index of that array. If the value changed of the slider you update the NSImageView with the image of the Array.
thanks a lot.
i am new to this platform, so can u please let me know how to assign array to slider?
awaiting your reply.
thanks
You don’t assign the array to the slider, you just use the slider’s integer value as the index value to refer to an image in your array. If you have an array with images in it called theData, and an image view called imageView, then this method will select images to load into your image view:
on sliderMoved_(sender) -- IBAction for the slider
imageView's setImage_(theData's objectAtIndex_(sender's integerValue()))
end sliderMoved_
Ric
thanks a lot
i will give it a try and get back to you.