0

I'm trying to get my NSSlider to start at a certain value, and I've been unable to find function to do that in the swift book or other resources. Is there an easy way to do this?

Thanks

Leo Dabus
  • 229,809
  • 59
  • 489
  • 571
GregarityNow
  • 707
  • 1
  • 11
  • 25

1 Answers1

3

You have to first create an outlet for your NSSlider:

@IBOutlet weak var yourSlider: NSSlider!

then you just have to set it's initial value as follow:

yourSlider.doubleValue = 0.5
Leo Dabus
  • 229,809
  • 59
  • 489
  • 571