addTarget:action:forControlEvents
来源:互联网 发布:俄罗斯 美国 知乎 编辑:程序博客网 时间:2024/05/16 07:11
- (void)addTarget:(id)target //动作信息接收方,即处理信息的对象
action:(SEL)action
forControlEvents:(UIControlEvents)controlEvents
Parameters
target
The target object—that is, the object to which the action message is sent. If this is nil, the responder chain is searched for an object willing to respond to the action message.
action
A selector identifying an action message. It cannot be NULL.
controlEvents
A bitmask specifying the control events for which the action message is sent. SeeControl Events for bitmask constants.
Discussion
Youmay call this method multiple times, and you may specify multiple target-actionpairs for a particular event. The action message may optionally include thesender and the event as parameters, in that order.
When you call this method, target is not retained.
源文档 <https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIControl_Class/#//apple_ref/occ/instm/UIControl/addTarget:action:forControlEvents:>
该方法归属于UIControl类,其继承结构如下所示:
- addTarget:action:forControlEvents(UIControl)
- addTarget:action:forControlEvents
- addTarget参数含义||addTarget: action: forControlEvents:
- but addTarget: action:
- forControlEvents 列表
- addTarget 与 addGestureRecognizer
- addTarget的用法
- addTarget各个参数的含义:
- 监听UITextField输入一般用addtarget
- VLC activeX控件 addTarget option设置使用方法
- 对UIButton的addTarget方法探究
- UIButton+Block分类代替addTarget实现快捷监听按钮点击
- ACTION
- Action
- action
- action
- action
- *.action
- Opencv调用GPU模块
- Node.js学习--基础知识(3)--回调函数与事件
- Android进行单元测试难在哪-part4
- CentOS Compile ffmpeg libx264 not found
- 互联网产品
- addTarget:action:forControlEvents
- PB中datawindow常用技巧
- spring <context:component-scan>使用说明(转)
- Struts2 重点总结 (2)
- 计算机网络--物理层 的一点总结
- Boosting算法简介
- 买哪种牌子的笔记本电脑好呢?
- hiho第七周——完全背包(动态规划)
- 平川出差之行