FQDateTimeSDK
GitHub地址
iOS年月日、时分秒选择器。 在原生控件的基础上增加秒的选择,和原生PickerView一样的丝滑。
更新记录这里默认大家对cocoaPods都是信手拈来的
在Podfile引入 pod 'FQDateTimeSDK'或者
pod 'FQDateTimeSDK', '~> 1.1.2' 在终端 cd 到你的项目根路径 下载 pod install或者
pod install --no-repo-update 更新 pod update或者
pod update FQDateTimeSDK --no-repo-update 使用案列 在用到时间选择器的地方引用头文件 #import <FQDateTimeSDK/FQDateTimeSDK.h> 遵循代理FQDateTimePickerViewDelegate @interface ViewController ()<FQDateTimePickerViewDelegate> @end 实现代理方法 - (void)confirmActionWithDate:(nonnull NSDate *)date withDateString:(nonnull NSString *)dateStr withTarget:(NSInteger)target { NSLog(@"wuwuFQ:%@---%@", date, dateStr); } - (void)cancelActionWithTarget:(NSInteger)target { NSLog(@"wuwuFQ:cancelAction"); } - (void)scrollActionWithDate:(nonnull NSDate *)date withDateString:(nonnull NSString *)dateStr withTarget:(NSInteger)target { NSLog(@"wuwuFQ:%@---%@", date, dateStr); } 年月日选择器 FQDateTimePickerView *pickerView = [[FQDateTimePickerView alloc] init]; pickerView.delegate = self; //遵循代理 pickerView.pickerModel = FQDateTimePickerModelDate; //日期模式 pickerView.cancelColor = [UIColor greenColor]; //取消颜色 pickerView.pickerColor = [UIColor yellowColor]; //滚轮字体颜色 pickerView.maskBackgroundColor = UIColor.cyanColor; //遮罩颜色 pickerView.pickerBackgroundColor = UIColor.lightGrayColor; //选择器背景色 pickerView.title = @"wuwuFQ"; //标题 pickerView.titleColor = [UIColor redColor]; //标题颜色 pickerView.unitsData = nil; //单位重置 pickerView.minDate = [NSDate new]; //最小时间 [pickerView showPicker]; //展示关注我~ 分享更多开发经验,一起成长~ GitHub地址 GitHub地址 GitHub地址
1.本站遵循行业规范,任何转载的稿件都会明确标注作者和来源;2.本站的原创文章,会注明原创字样,如未注明都非原创,如有侵权请联系删除!;3.作者投稿可能会经我们编辑修改或补充;4.本站不提供任何储存功能只提供收集或者投稿人的网盘链接。 |