插座和参考插座之间有什么区别? [英] What's the difference between outlet and referencing outlet in a simple sentence?

查看:84
本文介绍了插座和参考插座之间有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

插座是否连接到子视图并且引用插座连接到这些东西?是吗?

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

推荐答案

术语引用插座是指另一个引用当前对象或指向当前对象的对象的插座。

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

例如,假设您有一个具有文件所有者和UITableView的笔尖,以及其他内容。为了使tableview工作,它有一个数据源和委托,它们是出口,可以在IB中连接。从tableview的角度来看,数据源和委托是出口。从文件所有者的角度来看,tableview中的数据源和委托是引用插座。

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.

参考

此前的SO问题描述了引用插座什么是参考插座?

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

这篇关于插座和参考插座之间有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆