I have a problem with redrawing a user view in a simple cocoa application. Drawing is based on one parameter, which is changed by a simple NSSlider. However, despite the fact that I implement the -setParameter: and -parameter methods and bind the value of the slider to this parameter in the interface builder, I cannot force the user view to redraw itself.
The code that performs the redraw is as follows:
- (void)setParameter:(int)newParameter {
parameter = newParamter;
NSLog(@"Updated parameter: %d", parameter);
[self setNeedsDisplay:YES];
}
I get a message about setting a new parameter, although the view does not redraw itself. Any ideas are welcome!
source
share