I created a Reporter plugin,Add a NSSlider in the editViewController. view, and setContinuous: YES,then a delegate method has been written to slider and draw the background based on the value of the slider in
- (void) drawBackgroundForLayer: (GSLayer *) layer options: (NSDictionary *) options.
However, during my sliding process, the background cannot be updated in real-time, and only updates when I stop sliding.
I tried to print test data in the delegate method and in
- (void) drawBackgroundForLayer: (GSLayer *) layer options: (NSDictionary *) options.
when sliding, I found that the printing in the delegate method is real-time, and the printing in
- (void) drawBackgroundForLayer: (GSLayer *) layer options: (NSDictionary *) options.
is only printed in one go when the slider stops sliding.
Even with the addition of [_editViewController redraw];
or [_editViewController.view setNeedsDisplay: YES];
in the delegate method,that’s the same.
Why is this?
Can you post your full code (or send it in a private message). The order and where you call redraw/setNeedsDisplay
is important.
and can you show where you put the slider?
I sended a message to you with simple test demo.Thank you very much!