Latest1.2.0
Homepagehttps://github.com/FicentAlanZeng/FAZTimePicker
LicenseMIT
Platformsios 8.0, requires ARC
FrameworksUIKit
Authors

A date picker view to choose date and time in Objective-C. it supports iOS 8.0 later and it can run in any devices,such as iPhone 4~iPhone X

集成代码如下

增加头文件

#import "FAZTimePicker.h"

代码实现


FAZTimerPicker *datePicker = [[FAZTimerPicker alloc]init];

datePicker.minLimitDate = [NSDate dateWithTimeIntervalSinceNow:7200];

datePicker.maxLimitDate = [NSDate dateWithTimeIntervalSinceNow:14400];

datePicker.dateOutputFomatterString = @"yyyy-MM-dd HH:mm";

datePicker.commitBlock = ^(NSDate *date,NSString *dateString)
{
    self.label.text = dateString;
};

[datePicker show];

screenShots

Alt text

Latest podspec

{
    "name": "FAZTimePicker",
    "version": "1.2.0",
    "summary": "A date picker view to choose date and time in Objective-C. it support iOS 8.0 later and it can run in any device,such as iPhone 4~iPhone X",
    "description": "u65f6u95f4u9009u62e9u5668uff0cu53efu9002u7528iOS 8 u4ee5u4e0au7cfbu7edfuff0ciPhone4 ~ iPhone X u7684u673au578bu9002u914duff0cu53eau8981u4e24u53e5u4ee3u7801uff0cu60a8u53efu4ee5u8f7bu677eu7b80u4fbfu7684u5b9eu73b0u65f6u95f4u9009u62e9uff0cu6b64u63a7u4ef6u8fd8u80fdu6839u636eu60a8u60f3u8981u7684u7ed3u679cu81eau884cu8bbeu5b9au8f93u51fau7ed3u679cu7684u683cu5f0fuff0cu65e0u9700u989du5916u7684u683cu5f0fu88c5u6362uff0cu5b9eu73b0u4ee3u7801u5982u4e0b:nnFAZTimePicker *datePicker = [[FAZTimePicker alloc]init];ndatePicker.minLimitDate = [NSDate dateWithTimeIntervalSinceNow:(2*60)*60];ndatePicker.maxLimitDate = [NSDate dateWithTimeIntervalSinceNow:(1024*60)*60];ndatePicker.dateOutputFomatterString = @'yyyy-MM-dd HH:mm';ndatePicker.commitBlock = ^(NSDate *date,NSString *dateString)n{n//        self.label.text = dateString;n};n[datePicker show];",
    "homepage": "https://github.com/FicentAlanZeng/FAZTimePicker",
    "screenshots": "https://github.com/FicentAlanZeng/FAZTimePicker/blob/master/image.gif?raw=true",
    "license": "MIT",
    "authors": {
        "zengyongqiang": "[email protected]"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/FicentAlanZeng/FAZTimePicker.git",
        "tag": "1.2.0"
    },
    "source_files": "lib/*.{h,m}",
    "public_header_files": "lib/*.h",
    "frameworks": "UIKit",
    "requires_arc": true
}

Pin It on Pinterest

Share This