I have a code I am writing and its going well but I am having trouble with UISliders...specifically...setting values. I have used the sliders and now I want to reset them to the original state (0 to 10 with a value of 0 and the slider all the way to the left. I have...
@IBOutlet weak var redHorizontalSlider: UISlider!
Inside viewDidLoad:
redHorizontalSlider!.minimumValue = 0.0
redHorizontalSlider!.maximumValue = 1.0
redHorizontalSlider!.setValue(0.0, animated: false)
and when I print the values its giving me a nil and an error:
Fatal error: Unexpectedly found nil while implicitly unwrapping an Optional value
I have played around with ! and ? in the declaration of the Object and the calls but to no avail.