Max
Max

Reputation: 4646

Custom focus ring for NSTextView

I'm am able to draw a custom focus ring by subclassing the scrollView. My question is, how do I test if the textVeiw (that is inside the scrollView) has focus, in order to change the focus ring.

Upvotes: 0

Views: 680

Answers (1)

rdelmar
rdelmar

Reputation: 104092

You can subclass the text view and override becomeFirstResponder. That method will be called when the text view becomes the first responder, by clicking on it or tabbing from another responder.

Upvotes: 1

Related Questions