custom NSSliderCell

前端 未结 4 1606
无人共我
无人共我 2020-12-29 15:08

I\'ve sort of accomplised implementing a custom slider cell that can draw over using images for the scroll bar and knob. The only obstacle that is in the way now is this, wh

4条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-29 15:31

    Remove all the -lockFocus and -unlockFocus messages. The framework will take care of setting up the drawing context for you before -drawBarInside:flipped: or -drawKnob: are ever sent.

    Also, you shouldn't be creating any objects within a draw method.

提交回复
热议问题