View Single Post
Mark FX

 
Mark FX's Avatar
 
Member Since: Aug 13, 2011
Location: West Sussex, UK
Posts: 159
Mark FX has a spectacular aura about

Mark FX is offline
The First Responder cube object in the Interface Builder is an abstract class, that really
represents nil, in the standard Xcode templates the first responder is linked to the main window, and is the first place all user nil target action events are sent, then the window
forwards thes action events up the responder chain,

The main menu for the application in the standard template also has its methods connected
to the first resopnder, most controls views windows and the application itself are all in the
responder chain, if you want a particular control or project class to be the first responder,
then override the method below.

Code:
- (BOOL)canBecomeFirstResponder
{
        return YES;
}
For example

Code:
[[self view] becomeFirstResponder];
If you want you control or class to resign being the first responder, then send it the message
below.

Code:
[[self view] resignFirstResponder];
If your starting out as a beginner, then I would leave the standard project template first
responder set up as is, that way you can be sure that what ever view is currently on the
main window, it will recieve the user action events.

Regards Mark
QUOTE Thanks