MqlClock 1.3.0

MqlClock 1.3.0

测试已测试
语言语言 Obj-CObjective C
许可证 MIT
发布最新发布2018年10月

MQL9011name 维护。




MqlClock 1.3.0

MqlClock

描述

一行代码显示当前时间
基于 runTime 接口的倒计时
支持 UITableViewCell 及其各自的倒计时,支持滑动
支持后台倒计时


一行代码显示当前时间
基于 runTime 接口的倒计时
支持 UITableViewCell 及其各自的倒计时,支持滑动
支持后台倒计时
支持暂停重置

安装

Podfile

platform :ios, '8.0'

target 'TargetName' do
pod 'MqlClock', '~> 1.2.1'
end
pod install

如何使用

import

#import "MqlClock.h"

初始化时钟

 self.mc = [MqlClock sharedMqlClock];
 self.mc.delegate = self;
 self.mc.dateFormat = @"yyyy-MM-dd HH:mm:ss";

委托

@interface ViewController ()<MqlClockDelegate>

2017-04-25 10:45:57 星期二

- (void)showTheTimeNow:(NSString *)nowTime{
    self.timeLable.text = nowTime;

}

UIButton 倒计时 10.9.8.7...

- (void)countDown:(NSString *)cdTimer{
    [self.countDownBtn setTitle:[NSString stringWithFormat:@"倒计时%@",cdTimer] forState:UIControlStateNormal];
}

更改显示格式 2017/05/11 18:09:12

self.mc.dateFormat = @"yyyy/MM/dd HH:mm:ss";

UITableViewCell 倒计时

#import "UITableViewCell+MqlClock.h"

- (void)runCountDown{
    [self runCADisplayLinkTimer];
}

- (void)showTheCountDownTime:(NSString *)time{
    self.timeLable.text = time;
}

设置 tableViewCell 开始倒计时秒数

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    //here is your cell
    cell.mcStartSecond = [NSString stringWithFormat:@"%ld",(indexPath.row * 10 + 10)];
    return cell;
}

许可证

MIT