当前位置: 首页 > wzjs >正文

惠州网站建设英语房屋设计软件有哪些

惠州网站建设英语,房屋设计软件有哪些,seo学习网站,昆明手机网站建设ZJJTimeCountDown 效果图 特点: 1、已封装,支持自定义 2、支持文本各种对齐模式 3、各种效果都可以通过设置 ZJJTimeCountDownLabel 类属性来实现 4、支持背景图片设置 5、分文本显示时间时,支持设置文字大小,来动态设置每个文本…

ZJJTimeCountDown

效果图

特点:

1、已封装,支持自定义
2、支持文本各种对齐模式
3、各种效果都可以通过设置 ZJJTimeCountDownLabel 类属性来实现
4、支持背景图片设置
5、分文本显示时间时,支持设置文字大小,来动态设置每个文本宽度
6、动态的每个 Cell 中可支持多个倒计时
7、实现验证码倒计时,只需要调用两个方法就可以

支持 pod 导入

pod 'ZJJTimeCountDown', '~> 1.0.3'

使用注意事项:

1、显示倒计时的 label 要使用 ZJJTimeCountDownLabel 类或者继承 ZJJTimeCountDownLabel 类
2、要在使用 label 前设置 label 属性,动态 Cell 上使用一定要设置 timeKey 属性值,非动态 Cell 上使用不需要设置 timeKey 属性值,因为内部实现已经设置好
3、在动态的 UITableViewCell 或 UICollectionViewCell 上使用倒计时 label,需要调用以下两个方法

- (void)setupCellWithModel:(id)model indexPath:(NSIndexPath *)indexPath;- (NSAttributedString *)countDownWithModel:(id)model timeLabel:(ZJJTimeCountDownLabel *)timeLabel;

4、设置 textAdjustsWidthToFitFont 属性值为 YES,要确保 label 宽度够长

ZJJTimeCountDownLabel 支持对齐方式

//文本对齐方式
typedef NS_ENUM(NSInteger ,ZJJTextAlignmentStlye){ZJJTextAlignmentStlyeLeftCenter = 0,ZJJTextAlignmentStlyeLeftTop,ZJJTextAlignmentStlyeLeftBottom,ZJJTextAlignmentStlyeCenterTop,ZJJTextAlignmentStlyeCenter,ZJJTextAlignmentStlyeCenterBottom,ZJJTextAlignmentStlyeRightTop,ZJJTextAlignmentStlyeCenterRight,ZJJTextAlignmentStlyeRightBottom,//自定义位置,配合textLeftDeviation和textTopDeviation属性值来使用ZJJTextAlignmentStlyeCustom,//水平居中,配合textLeftDeviation属性值来使用ZJJTextAlignmentStlyeHorizontalCenter,//垂直居中 配合textTopDeviation属性值来使用ZJJTextAlignmentStlyeVerticalCenter,};

ZJJTimeCountDown 支持时间格式:

typedef NS_ENUM(NSInteger , ZJJCountDownTimeStyle) {//时间格式:2017-7-12 18:06:22ZJJCountDownTimeStyleNormal = 0,//时间戳:1591881249ZJJCountDownTimeStyleTamp,//时间格式 20170712180622ZJJCountDownTimeStylePureNumber};

如何使用

一、使用 ZJJTimeCountDownLabel 类或继承 ZJJTimeCountDownLabel 类来创建倒计时 label ,     并在初始化视图时设置 label 属性,动态 Cell 上的 label 的 timeKey 属性一定要设置,推荐以下三种设置方式

1)、如果是使用继承 ZJJTimeCountDownLabel 类,在该类的.m 文件中重写以下方法

- (void)setupProperty{//对应模型中要显示的倒计时的属性字符串(动态Cell中,必须要设置timeKey)self.timeKey = @"endTime";//边框模式self.textStyle = ZJJTextStlyeDDHHMMSSBox;//居中对齐self.jj_textAlignment = ZJJTextAlignmentStlyeCenter;//设置过时数据自动删除self.isAutomaticallyDeleted = YES;
}

2)、直接使用 ZJJTimeCountDownLabel 类,如果非 xib 形式,初始化时进行设置

    self.timeLabel = [[ZJJTimeCountDownLabel alloc] init];//对应模型中要显示的倒计时的属性字符串(动态Cell中,必须要设置timeKey)self.timeLabel.timeKey = @"endTime";//边框模式self.timeLabel.textStyle = ZJJTextStlyeDDHHMMSSBox;//居中对齐self.timeLabel.jj_textAlignment = ZJJTextAlignmentStlyeCenter;//过时后,显示的文字self.timeLabel.jj_description = @"活动结束了!";

3)、直接使用 ZJJTimeCountDownLabel 类,如果是 xib 形式,在 ZJJTimeCountDownLabel 的父视图初始化时设置

  - (void)awakeFromNib {[super awakeFromNib];//对应模型中要显示的倒计时的属性字符串(动态Cell中,必须要设置timeKey)self.timeLabel.timeKey = @"endTime";//居中对齐self.timeLabel.jj_textAlignment = ZJJTextAlignmentStlyeCenter;//过时后,显示的文字self.timeLabel.jj_description = @"活动结束了!";
}

二、创建 ZJJTimeCountDown 对象,不同的使用场景,创建 ZJJTimeCountDown 对象的方法也有所不同,以下两种使用场景

1、在动态的 UITableViewCell 或 UICollectionViewCell 上使用

1)、创建 JJTimeCountDown 对象的方法

_countDown = [[ZJJTimeCountDown alloc] initWithScrollView:self.tableView dataList:self.dataList];

2)、在代理方法中设置 label 的 indexPath 和 attributedText 属性

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {static NSString *cellID = @"cellID";ZJJTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellID];if (cell == nil) {cell = [[ZJJTableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:cellID];}TimeModel *model = self.dataList[indexPath.row];//一定要设置,设置时间数据[cell.timeLabel setupCellWithModel:model indexPath:indexPath];//在不设置为过时自动删除情况下 设置该方法后,滑动过快的时候时间不会闪情况cell.timeLabel.attributedText = [self.countDown countDownWithTimeLabel:cell.timeLabel];return cell;
}

3)、在 Cell 的区头或区尾上使用,返回的区头或区尾视图代理方法中,要先调用以下方法,对视图进行处理

- (UIView *)dealWithHeaderView:(UIView *)view viewForHeaderInSection:(NSInteger)section;- (UIView *)dealWithFooterView:(UIView *)view viewForFooterInSection:(NSInteger)section;
2 非动态的 UITableViewCell 或 UICollectionViewCell 上使用

1)创建 JJTimeCountDown 对象并添加 label

   _countDown = [[ZJJTimeCountDown alloc] init];//时间格式为时间戳_countDown.timeStyle = ZJJCountDownTimeStyleTamp;//设置代理_countDown.delegate = self;//添加数据, time:时间戳[_countDown addTimeLabel:self.timeLabel time:@"1591881249"];

三、ZJJTimeCountDown 代理方法

/**过时的数据自动删除回调方法, 针对UITableView 或者 UICollectionView上的倒计时视图@param model 数据模型*/
- (void)scrollViewWithAutomaticallyDeleteModel:(id)model;
/**过时的数据回调方法,回调的数据调用addTimeLabel:(ZJJTimeCountDownLabel *)timeLabel time:(NSString *)time方法所添加数据@param timeLabel 倒计时视图@param timeCountDown self*/
- (void)outDateTimeLabel:(ZJJTimeCountDownLabel *)timeLabel timeCountDown:(ZJJTimeCountDown *)timeCountDown;/**每次执行倒计时,回调方法@param timeLabel 倒计时Label@param timeCountDown self*/
- (void)dateWithTimeLabel:(ZJJTimeCountDownLabel *)timeLabel timeCountDown:(ZJJTimeCountDown *)timeCountDown;/**自定义时间格式方法 ,需要设置timeLabel的textStyle为ZJJTextStlyeCustom,自定义时间样式才会生效如果返回值为nil或者@“”,自定义时间格式失败,失败后显示原来时间格式@param timeLabel 时间label@param timeCountDown self@return 自定义时间格式字符*/
- (NSAttributedString *)customTextWithTimeLabel:(ZJJTimeCountDownLabel *)timeLabel timeCountDown:(ZJJTimeCountDown *)timeCountDown;

四、销毁定时器

- (void)dealloc{[self.countDown destoryTimer];
}

文章转载自:

http://ETkINYbU.rydbs.cn
http://KBERVGAP.rydbs.cn
http://1kg5MBgx.rydbs.cn
http://C64Y0Vy8.rydbs.cn
http://NJtTBxgI.rydbs.cn
http://mBASO5Gf.rydbs.cn
http://ux1IotqO.rydbs.cn
http://WL5nYwPS.rydbs.cn
http://ICwBEzI2.rydbs.cn
http://YPf2Efh8.rydbs.cn
http://qZaWeHSh.rydbs.cn
http://HCE5JMan.rydbs.cn
http://sGxlGu9R.rydbs.cn
http://RiTKIImd.rydbs.cn
http://WI4x9paX.rydbs.cn
http://urOLYfAj.rydbs.cn
http://KepFARwl.rydbs.cn
http://XR55il61.rydbs.cn
http://JyB2tUkd.rydbs.cn
http://NE5lXrli.rydbs.cn
http://bXLUYNzD.rydbs.cn
http://4Oc7M3Wc.rydbs.cn
http://ECCAdFpA.rydbs.cn
http://Udvuplyh.rydbs.cn
http://7N0facAy.rydbs.cn
http://dPk4IuIc.rydbs.cn
http://LH6d0eo2.rydbs.cn
http://8mbnSvoN.rydbs.cn
http://UWJ1eRo9.rydbs.cn
http://4ZuUTdDZ.rydbs.cn
http://www.dtcms.com/wzjs/755009.html

相关文章:

  • 重庆金建站天眼查企业查询下载
  • 免费网站模板库视频背景做网站背景
  • 网站音乐播放器插件网络营销的五个发展阶段
  • 建设网站女装名字大全深圳龙华区是哪个区
  • 山东济南网站推广新媒体销售好做吗
  • 自己怎么开发网站谷歌浏览器下载官方正版
  • 做一套网站多钱徐州seo代理计费
  • 最牛的视频网站建设毕业设计题目
  • 确定网站主题快速搭建网站推荐
  • 网站开发必须要用js编制综合网站平台的公司排名
  • 门户网站系统架构网站开发合同受托方
  • 湘潭新思维网站淘宝关键词排名查询网站
  • 网站带app建设建站平台排行
  • 网站模板 使用兰蔻搜索引擎营销案例
  • 宁波 商城网站建设优化的意思
  • 课程的网站建设如何给网站增加图标
  • 专业网站设计制作服务广州建站工作室
  • 中建八局第一建设有限公司资质东莞做网站优化的公司
  • 海外推广的网站有哪些百度快速排名软件
  • html仿淘宝首页电子商务网站首页wordpress使用端口
  • 杭州大江东建设局网站中国建设招标网住建部网站
  • 珠海门户网站建设短视频网站如何做推广
  • 福千欣隆网站建设公司 概况类似wordpress博客系统
  • 2017网站开发工资wordpress有广告插件
  • 安庆怀宁网站建设兼职青岛外贸假发网站建设
  • 做网站 以图搜货全国网页制作大赛
  • 自适应微网站开发资产管理系统源码
  • h5网站建设作用完成网站群建设
  • 做seo网站优化多少钱wordpress 汉化包
  • 专门做特卖的网站是什么美食网站开发