I have slider with volume value. I need changed volume in live. Whats wrong in my code?
@IBOutlet weak var volumeSliderCurr: NSSlider!
@IBAction func volumeSlider(sender: AnyObject) {
var event: NSEvent = NSApplication.sharedApplication().currentEvent!
mouseUp(event)
}
override func mouseUp(theEvent: NSEvent) {
super.mouseUp(theEvent)
audioPlayer.volume = volumeSliderCurr.floatValue
currVolume = volumeSliderCurr.floatValue
}
If you set Continuous
in the properties of Interface Builder you get permanent updates of the slider value:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With