Determine when NSSlider knob is 'let go' in continuous mode

后端 未结 7 1091
青春惊慌失措
青春惊慌失措 2020-12-17 10:19

I\'m using an NSSlider control, and I\'ve configured it to use continuous mode so that I can continually update an NSTextField with the current value of the slider while the

7条回答
  •  粉色の甜心
    2020-12-17 10:26

    Subclass NSSlider and implement

    - (void)mouseDown:(NSEvent *)theEvent
    

    it's called mouseDown:, but its called when the know interaction ends

    - (void)mouseDown:(NSEvent *)theEvent {
        [super mouseDown:theEvent];
        NSLog(@"Knob released!");
    }
    

提交回复
热议问题