简体   繁体   English

iOS中的插座和动作

[英]Outlets and Actions in IOS

I am new to IOS development and have a question. 我是IOS开发的新手,有一个问题。

I wanted to know what is the role of the Outlet and Action in IOS development? 我想知道“渠道和行动”在IOS开发中的作用是什么?

I have tried searching online but just found examples. 我曾尝试过在线搜索,但发现了一些示例。 I wanted some background information about this so I have better knowledge on Outlets and Actions before I dig into coding. 我想要一些有关此的背景信息,因此在深入研究编码之前,我对插座和操作有更好的了解。

I would appreciate it if someone could explain this to me or direct me to an online source. 如果有人可以向我解释一下或将我定向到在线资源,我将不胜感激。

Thanks in advance. 提前致谢。

have a look here, very well explained. 在这里看看,很好的解释。 With 2 minutes of time, you've found it by yourself. 2分钟的时间,您就可以自己找到它。 NSHipster NSHipster

An IBOutlet a way to mark a property that is defined (usually) within your UIViewController (or descendant) to allow access to/from a view object created within the Interface Builder (hence the "IB"). IBOutlet是一种标记属性的方法,该属性通常在UIViewController(或后代)中定义,以允许访问/从在Interface Builder中创建的视图对象访问(因此称为“ IB”)。

An IBAction a way to mark a method that is defined (usually) within your UIViewController (or descendant) to allow access to/from a view object (UIButton, etc) created within the Interface Builder (hence the "IB"). IBAction是一种标记方法的方法,该方法标记(通常)在UIViewController(或后代)中定义的方法,以允许访问/来自在Interface Builder中创建的视图对象(UIButton等)(因此称为“ IB”)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM