iphonewax下用lua代码addTarget_action_forControlEvents给UIButton添加事件程序crash解决办法
来源:互联网 发布:js parsefloat 编辑:程序博客网 时间:2024/06/11 13:55
创建button代码的地方要初始化button的类型 如下:
local play = UIButton:buttonWithType(UIButtonTypeCustom) play:setFrame(CGRect(p[1], p[2], size.width, size.height)) play:setBackgroundImage_forState(imgplay, 0) play:addTarget_action_forControlEvents(self,"onDeleteIconClick:",UIControlEventTouchUpInside)
事件处理代码如下:
function onDeleteIconClick(self, sender) puts(" clicked------ ") end
console输出截图
另外:凭个人经验(不一定正确)wax框架下的lua函数定义的时候函数签名不在特定时候不能使用下划线“_”.
- iphonewax下用lua代码addTarget_action_forControlEvents给UIButton添加事件程序crash解决办法
- 用代码给控件添加事件
- 给事件添加处理程序
- Mac下给Wireshark添加Lua脚本
- Unity用代码给按钮添加点击事件
- iphonewax框架下上传应用出现non-public API usage ...... waxsim:SBApplication 解决办法
- 给 UIButton、UILabel添加下划线
- 第五部分 给程序添加退出事件
- 第五部分 给程序添加退出事件
- UIView UIButton UIImageView 添加事件
- UIButton添加长按事件
- UIButton添加block点击事件
- IOS模仿UIButton添加事件
- 给S5PV210裸机程序添加启动代码
- 给iOS程序添加push代码
- 给button添加响应事件时出错,解决办法
- Windows下,给Nim程序添加图标
- iphonewax框架下自定义类的实现
- CS与BS互相通讯
- Spring依赖实现
- cvSetData(A,arryA,CV_AUTOSTEP)// cvSolve(A,b,x,CV_LU);
- C++多线程面向对象解决方案
- Ubuntu Server 11.10 安装 Hiphop-php
- iphonewax下用lua代码addTarget_action_forControlEvents给UIButton添加事件程序crash解决办法
- oracle 触发器两个重要的内存表
- iOS 之多线程
- C语言中的编译和链接
- 计算机视觉领域的一些牛人博客,超有实力的研究机构等的网站链接
- 秒杀多线程第二篇 多线程第一次亲密接触 CreateThread与_beginthreadex本质区别 .
- linux下如何杀死进程
- ICMP协议基本格式
- 只在堆上或只在栈上定义对象