문제

Is there a way to make an IBOutlet of an NSSlider and then be able to change its value programmatically? slider.value = ...does not work.

Thanks!

도움이 되었습니까?

해결책

You can use the methods of NSControl.

Example: [self.slider setDoubleValue:0.1];

다른 팁

Swift answer to this question is to use the doubleValue property to access the slider value in OSX:

slider.doubleValue = 0.1 

print(slider.doubleValue)
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top