I am trying trying to make a UISlider be enabled/disabled on button click, however Xcode is telling me that "UISlider does not have a member..."; basically, it doesn't work. When the button is clicked, it multiplies a variable by -1. If the variable is negative, then the UISlider will be enabled. If the variable is positive, then the UISlider will be disabled. The slider is called "userHue" and "opaque" is the label's name. The label is covering the slider. This is my code:
var noomber = 1
@IBAction func transparent(sender: UIButton)
{
noomber = -(noomber)
if(noomber<0)
{
opaque.backgroundColor = UIColor(hue: 0, saturation: 0, brightness: 0, alpha: 0)
userHue.userInteractionEnabled = true
}
else
{
opaque.backgroundColor = UIColor.whiteColor()
userHue.userInteractionEnabled = false
}
}
I have searched for at least an hour and I still cannot find any answer to my question. Thanks in advance.
0 comments:
Post a Comment