设为首页 加入收藏

TOP

【代码笔记】iOS-手机验证码(二)
2017-10-13 10:28:49 】 浏览:5763
Tags:代码 笔记 iOS- 手机 验证
--%ld---",[d second]); if([d second] < 60 && [d second] > 0) { NSString *miao = [NSString stringWithFormat:@"%ld",[d second]]; NSLog(@"---miao----%@",miao); UIButton *sendYZM=[UIButton buttonWithType:UIButtonTypeCustom]; [sendYZM setFrame:CGRectMake(50, 100, 250, 50)]; [sendYZM setBackgroundColor:[UIColor redColor]]; [sendYZM setTitle:[NSString stringWithFormat:@"重新发送验证码(%@秒)",miao] forState:UIControlStateNormal]; [sendYZM setTitleColor:[UIColor colorWithRed:66/255.0 green:66/255.0 blue:221/255.0 alpha:1.0] forState:UIControlStateNormal]; [self.view addSubview:sendYZM]; }else if([d second] == 0) { [sysTimer invalidate]; UIButton *sendYZM=[UIButton buttonWithType:UIButtonTypeCustom]; [sendYZM setFrame:CGRectMake(50, 100, 250, 50)]; [sendYZM setBackgroundColor:[UIColor redColor]]; [sendYZM setTitle:@"重新发送验证码" forState:UIControlStateNormal]; [sendYZM setTitleColor:[UIColor colorWithRed:66/255.0 green:66/255.0 blue:221/255.0 alpha:1.0] forState:UIControlStateNormal]; [sendYZM addTarget:self action:@selector(doClickButton:) forControlEvents:UIControlEventTouchUpInside]; [self.view addSubview:sendYZM]; } } - (void)getAuthCode{ //将电话号码发送到服务器,服务器返回验证码。当验证码和注册用户输入一样的时候,则可以进行下一步操作。 } - (void)didReceiveMemoryWarning { [super didReceiveMemoryWarning]; // Dispose of any resources that can be recreated. } /* #pragma mark - Navigation // In a storyboard-based application, you will often want to do a little preparation before navigation - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { // Get the new view controller using [segue destinationViewController]. // Pass the selected object to the new view controller. } */ @end
复制代码

 

 

 
 
首页 上一页 1 2 下一页 尾页 2/2/2
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇最新cocoapods安装流程,安装过程.. 下一篇根据字符串链接_二维码生成

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目