Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the difference between outlet and referencing outlet in a simple sentence?

Is outlet connect to a subview and referencing outlet connect to the stuff? Is that it?

like image 643
user4951 Avatar asked Apr 26 '11 03:04

user4951


2 Answers

The term referencing outlet means an outlet in another object that references, or points to, the current object.

As an example, say you have a nib that has a File's Owner and a UITableView in it, among other things. In order for a tableview to work it has a datasource and delegate, which are outlets and can be connected in IB. From the standpoint of the tableview the datasource and delegate are outlets. From the standpoint of the File's Owner the datasource and delegate in the tableview are referencing outlets.

Reference

This previous SO question describes referencing outlet What is a referencing outlet?

like image 134
visakh7 Avatar answered Oct 21 '22 11:10

visakh7


An outlet is a place on the object that you can connect something to. For example, if you have a FooViewController that has an outlet named bar, you might connect an object BazView to that outlet so the bar property on the FooViewController instance points to the BazView object after the nib is loaded.

A "referencing outlet" is just IB showing you that this object is connected to an outlet on some other object. To use the same example, when you looked at the BazView instance in IB, it would show you a "referencing outlet" to let you know that the BazView is connected to the FooViewController's bar property.

like image 29
Anomie Avatar answered Oct 21 '22 12:10

Anomie