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

后端 未结 2 1928
醉话见心
醉话见心 2021-02-03 13:34

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

2条回答
  •  Happy的楠姐
    2021-02-03 13:49

    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?

提交回复
热议问题