Ram
Ram

Reputation: 1890

How to find an Object (Controller or View) resigned first Responder?

I would like to do some cleanup activity when a particular object resigns the FirstResponder. Is there any way to detect whether object has resigned first responder status.

What methods I need to implement to know this? Any pointers for this?

I already gone through this link. But I did not get much out of it.

NSTableView & NSOutlineView editing on tab key

Upvotes: 0

Views: 237

Answers (1)

Bruno Ferreira
Bruno Ferreira

Reputation: 952

According to Apples's NSResponder documentation you should override the resignFirstResponder method for you subclass.

Something like this:

- (BOOL)resignFirstResponder
{
    [super resignFirstResponder];
    /* Your cleanup code here */
}

Upvotes: 2

Related Questions