1. 创建按钮#pragma mark 创建橙色按钮- (void) createOrangeBtn{ // 创建按钮 //[[UIButton alloc] initWithFrame:]; UIButton *btn = [[UIButton alloc] init]; ...
分类:
其他好文 时间:
2014-07-22 22:56:13
阅读次数:
248
先上效果图:
这个程序分2个层次,一个是顶部的带UITextField的bar,一个是下拉选择的view,下拉选择的view带有4个自定义的UIView
我们先定义一个UIViewController叫MyViewController,然后顶部的bar叫TopBarView,下拉选择的view叫TypeSelectView,像UIButton的自定义的view叫做TypeVie...
分类:
移动开发 时间:
2014-07-18 23:04:56
阅读次数:
290
@interface MainViewController : UIViewController @property (strong, nonatomic) UIButton *myBtn; @property (strong, nonatomic) UISlider *mySlider...
分类:
其他好文 时间:
2014-07-18 21:18:24
阅读次数:
179
[m_selectUserBtr.layer setMasksToBounds:YES]; [m_selectUserBtr.layer setCornerRadius:3]; //设置矩形四个圆角半径 [m_selectUserBtr.layer setBorderWidth:...
分类:
其他好文 时间:
2014-07-13 10:42:37
阅读次数:
200
有时候有些操作是防止用户在一次响应结束中再响应下一个。但有些测试用户就要猛点,狂点。像这种恶意就要进行防止。当然有些异步操作时,可以在调用前enable 掉。等CallBACK 后再enable起来。过程中按钮是不能点的。1、可以使用:- (void) timeEnough{ UIButton *b...
分类:
移动开发 时间:
2014-07-09 18:27:30
阅读次数:
253
//UIButton *aBtn=[UIButton buttonWithType:UIButtonTypeCustom];//[aBtn setFrame:CGRectMake(40, 100, 60, 60)]; [aBtn setBackgroundImage:[UIImage imag...
分类:
移动开发 时间:
2014-07-09 18:11:59
阅读次数:
666
1. [代码][C/C++]代码 //这里创建一个圆角矩形的按钮 UIButton *button1 = [UIButton buttonWithType:UIButtonTypeRoundedRect]; // 能够定义的button类型有以下6种,// typedef enum {// ...
分类:
移动开发 时间:
2014-07-07 19:00:16
阅读次数:
238
有时候UI给开发的资源跟实际的frame不一致,这个时候我们就要去拉伸图片
UIImage* image = [[UIImage imageNamed:@"text_field_bg.png"] stretchableImageWithLeftCapWidth:20 topCapHeight:0]; //stretchableImageWithLeftCapWidth使图片有拉伸效果
UI...
分类:
移动开发 时间:
2014-07-05 22:51:09
阅读次数:
332
cocos2dx --- 关于模态弹窗中按钮响应的问题...
分类:
其他好文 时间:
2014-07-01 08:45:29
阅读次数:
244