开发者社区> 问答> 正文

设置按钮在十分钟之内禁用

ios应用中的button:

_Button = [UIButton buttonWithType:UIButtonTypeCustom];
UIImage *shareIMG = [UIImage imageNamed:@"button.png"];
[_Button setBackgroundImage:shareIMG forState:UIControlStateNormal];
[_Button setBackgroundImage:[UIImage imageNamed:@"button_active.png"] forState:UIControlStateHighlighted];
[_Button addSubview:titleLabel];

UILabel * titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 3, shareIMG.size.width, shareIMG.size.height)];
[titleLabel setTextAlignment:UITextAlignmentCenter];
[titleLabel setText:@"Button";
[_Button addSubview:titleLabel];
[titleLabel release];
[_Button setFrame:CGRectMake(2 * self.sendPushButton.frame.origin.x + self.sendPushButton.frame.size.width , 380 - liteIndent1 - liteIndent2 + iphone5Fix, shareIMG.size.width, shareIMG.size.height)];
[self addSubview:_Button];

怎么样设置这个按钮暂停button_non_active.png,并且在点击后10分钟之内不能再次点击?

展开
收起
爵霸 2016-03-26 09:26:05 2047 0
0 条回答
写回答
取消 提交回答
问答分类:
问答地址:
问答排行榜
最热
最新

相关电子书

更多
低代码开发师(初级)实战教程 立即下载
冬季实战营第三期:MySQL数据库进阶实战 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载