ios-获取验证码按钮.zip

时间:2022-07-31 12:07:45
【文件属性】:
文件名称:ios-获取验证码按钮.zip
文件大小:155KB
文件格式:ZIP
更新时间:2022-07-31 12:07:45
按钮 一个获取验证码,实现倒计时的封装类。 有OC版本和Swift版本,git地址: https://github.com/ZHShare/XFetchCodeButton.git // 部分代码 Swift: let codeButton = XFetchCodeButton(frame: CGRect(x: 20, y: 100, width: 100, height: 50)) codeButton.backgroundColor = .black codeButton.normalTitle = "Fetch Code" codeButton.normalTintColor = UIColor.white self.view.addSubview(codeButton) codeButton.doneSend { print("codeButton 已发送") } OC: XFetchCodeButton * button = [[XFetchCodeButton alloc] initWithFrame:CGRectMake(20, 100, 100, 50)]; button.backgroundColor = [UIColor blackColor]; [self.view addSubview:button]; [button doneSend:^{ NSLog(@"button click"); }];

网友评论