iOS之代码创建button
来源:互联网 发布:淘宝怎么避免虚假交易 编辑:程序博客网 时间:2024/05/17 22:47
在storyBoard连线的时候,方法返回值是IBAction,所谓IBAction就是可以连线的void
UIButton *button = [UIButtonbuttonWithType:UIButtonTypeCustom];
[button setFrame:CGRectMake(110.0,220.0, 100.0,40.0)];
[button setTitle:@"button默认状态"forState:UIControlStateNormal];
[button setTitle:@"button点击状态"forState:UIControlStateHighlighted];
[button setTitleColor:[UIColorredColor] forState:UIControlStateNormal];
[button setTitleColor:[UIColorgreenColor] forState:UIControlStateHighlighted];
[button setBackgroundColor:[UIColororangeColor]];
//点击执行的函数
[button addTarget:selfaction:@selector(tapButton)forControlEvents:UIControlEventTouchUpInside];
[self.viewaddSubview:button];
0 0
- iOS之代码创建button
- ios创建开关Button
- iOS开发 button代码
- android之创建button
- cocos2dx之创建Button
- iOS自适应button循环创建
- iOS之button
- ios 代码写Button小结
- iOS中用代码创建button时,用addtarget增加响应函数时引发崩溃
- iOS 之Button动效
- IOS开发for循环创建button
- iOS 导航栏创建多个Button
- 【代码笔记】iOS-点击一个button,出6个button
- iOS中代码调用button方法
- 【代码笔记】iOS-长条蓝色button
- IOS -- UIButton 代码创建
- 代码创建ios按键
- IOS UIButton 代码创建
- hdu5402Travelling Salesman Problem 构造
- hdoj 1598 find the most comfortable road【并查集&&暴力枚举】
- 《我与c++的第二次相遇》 --1 【重新学习c++】
- 硬盘安装Ubuntu12.04
- UML学习笔记之Rational Rose 视图模型概述
- iOS之代码创建button
- Ubuntu下安装Libsvm(解决raise Exception('LIBSVM library not found.'))总结汇总
- Android 获取手机中所有图片
- UVA Live-3942 Remember the Word(trie树入门题)
- 本地计算机上的OracleOraDb10g_home1TNSListener服务启动后又停止解决办法
- 主线程上延时,使用postDelayed
- windows下开发的Web Projectj项目放到Linux服务器下出现路径问题
- flask 学习
- C++学习——模板与异常处理