Be sure to read and abide by the license accompanying this distribution. The license explicitly states what you can and cannot do.
You need to add either the SMDoubleSliderIB3Framework or all four of the
SMDoubleSliderCell.h/.m files to your application. I won't give explicit directions on how to do that here. Check in the Xcode Help if you need some assistance.
Usually, you will use Interface Builder to put a double slider into a nib file. Hook up your target action (or bindings). You can also create a double slider at run time using the
You could also assign a table column to contain double sliders by using the
SMDoubleSliderCell class and
-setDataCell: method. Here's an example of how you could use it. In the example,
myTableView is a variable of type
cell = [ [ [ SMDoubleSliderCell alloc ] init ] autorelease ];
[ cell setMinValue:5 ];
[ cell setMaxValue:10 ];
[ [ myTableView tableColumnWithIdentifier:@"sliderColumn" ] setDataCell:cell ];
Note: I've never tried to make a column of double sliders. I'm not sure how they would be able to get both low and high values from the table data source. It'd probably need some kind of dictionary with a low value and high value keys that could be passed by the table to
-setObjectValue: method. Of course, the
-setObjectValue: method would then need to check for a dictionary class and grab those two keys (if they exist). If anybody implements this and tests it, please send it back so I can include it in the main source.