Skip to content

A date picker view to choose date and time in Objective-C

License

Notifications You must be signed in to change notification settings

FicentAlanZeng/FAZTimePicker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FAZTimePicker

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