Reputation: 255
I have a simple OSX application that consists of a NSWindow with a custom NSView (used for drawing) and a NSSlider. When I change the NSSlider's value, I need to update data inside my custom NSView. What is the correct approach to this problem? A delegate? Something else? Please assist me with this matter. Thank you!
Upvotes: 0
Views: 447
Reputation: 11594
Set the action of your NSSlider to an IBAction in your controller object. When the slider is changed, your action method will get called. Then, in that method, update your model and refresh your view. If you still don't understand, be sure to mention what you tried and what's not working.
Upvotes: 3