Latest 1.2.1
Homepage https://github.com/MQL9011/MqlClock
License MIT
Platforms ios 8.0, requires ARC
Authors


Description

Line of code shows the current time
Countdown based on runTime interface
support UITableViewCell their respective countdown, support sliding
Supports background countdown


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

Install

The podfile

platform :ios, '8.0'

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

How to Use

import

#import "MqlClock.h"

Init The clock

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

delegate

@interface ViewController ()<MqlClockDelegate>

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

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

}

UIButton countdown 10.9.8.7…

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

Change the display format 2017/05/11 18:09:12

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

UITableViewCell CountDown

#import "UITableViewCell+MqlClock.h"

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

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

Set tableViewCell start CountDown second

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

更多咨询及用法

加群二维码
群名称:iOS-MqlClock交流群
群 号:376686217

作者的详细使用说明请点击

License

MIT

Latest podspec

{
    "name": "MqlClock",
    "version": "1.2.1",
    "summary": "u4e00u884cu4ee3u7801u663eu793au5b9eu65f6u65f6u95f4.",
    "description": "Real-time dynamic display time.",
    "homepage": "https://github.com/MQL9011/MqlClock",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "MQL": "https://github.com/MQL9011"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/MQL9011/MqlClock",
        "tag": "1.2.1"
    },
    "source_files": "MqlClock/*.{h,m}",
    "requires_arc": true
}

Pin It on Pinterest

Share This