I deleted view's referencing outlet (File's owner), I received an error when I load the view. I am wondering why we need to set the referencing outlet?
Asked
Active
Viewed 2,590 times
0
-
what error are you getting? What are you talking about exactly? Interface builder? – Gabriele Petronella Aug 22 '13 at 15:02
-
also, why don't you google your question before posting: http://stackoverflow.com/questions/15251370/what-is-the-files-owner-in-interface-builder – Gabriele Petronella Aug 22 '13 at 15:03
2 Answers
1
Fileowner
is used to store reference to interface builder components, so that it can communicate with interface objects when view loaded or when required in code. It is the connection between the IB and its controller. So, Fileowner
outlet must be set to display IB objects in iOS. If you remove the top level Outlet
application will fail to communicate with IB and will crash.

Ashwani
- 3,463
- 1
- 24
- 31
0
The view controller (which appears as "File's owner") needs an outlet for its view
property, which should be connected to the top-level view in your XIB. If there is no outlet, the view will be nil. That's just how it works. There could be multiple top-level views in your XIB, so you need to make the appropriate connection.

Mike Weller
- 45,401
- 15
- 131
- 151