2

What is main difference between File's Owner and First Responder and What is its use ? I don't know what is First Responder.. ?

Maulik Kundaliya
  • 452
  • 3
  • 17
  • similer question http://stackoverflow.com/questions/2305183/the-concept-of-files-owner-first-responder-and-application-delegate-in-iphone – Tirth Aug 08 '13 at 05:55
  • http://stackoverflow.com/questions/5617808/files-owner-first-responder – Tirth Aug 08 '13 at 05:56
  • possible duplicate of [What are File Owner and First Responder in iPhone SDK - xCode?](http://stackoverflow.com/questions/3768602/what-are-file-owner-and-first-responder-in-iphone-sdk-xcode) – Ozair Kafray Mar 26 '15 at 10:39

2 Answers2

0

Files Owner:

The File owner is the object that loads the nib . Ie. that object which receives the message loadNibNamed: or initWithNibName: . So if you want to access any objects in the nib from the object after loading it , you set an outlet to the the file owner .

First Responder:

A responder is an object that can respond to events and handle them. All responder objects are instances of classes that ultimately inherit from UIResponder (iOS) or NSResponder (OS X). These classes declare a programmatic interface for event handling and define a default behavior for responders. The visible objects of an app are almost always responders—for example, windows, views, and controls—and the app object is a responder as well. In iOS, view controllers (UIViewController objects) are also responder objects.

hope you will help you to understand your query.

hpp
  • 619
  • 3
  • 13
0

Files Owner and First Responder are proxies for objects that will exist at runtime. Specifically, Files Owner represents the object which will be passed in for owner in the method [NSBundle loadNibNamed: owner]. You can specify, via the Attributes Info Panel, what kind of object owner will be. Once you've indicated what Files Owner is, you can make connections to it.

First Responder is your portal to the Responder Chain. You can add Actions to First Responder in the "Classes" tab of the document window. Next, connect buttons and menu items to First Responder so that they call the desired action. The first object in the responder chain that understands this action will be called.

See the Cocoa documentation for more information about how the responder chain works.

Maulik Kundaliya
  • 452
  • 3
  • 17