cxtretar / cxdatepickerview Goto Github PK
View Code? Open in Web Editor NEW一个自定义的日期时间选择器
License: MIT License
一个自定义的日期时间选择器
License: MIT License
既然发布到pod上,引用的分类方法名字,应该带一个前缀,避免与其他分类名字冲突,而且分类只用到了两个方法,希望能精简一下
我选择一个时间,确认后会自动往前+8个时区。
最新版本0.2.0天数最大只能选择到29号
被遮挡
因为项目需求 需要有 00-00-00 dd-hh-mm
iOS14.3 在模拟器上运行demo,选择月-日-时-分弹出的日期单位重复
iOS14中,设置隐藏分割线的时候,数组越界。因为iOS14 的UIPickerView的子视图层次改变了。
if (_hideSegmentedLine) {
((UIView *)[self.datePicker.subviews objectAtIndex:1]).backgroundColor = [UIColor clearColor];
((UIView *)[self.datePicker.subviews objectAtIndex:2]).backgroundColor = [UIColor clearColor];
}
iOS14 的数据选择器不再有分割线了。它现在 从一个选中行的两条分割线 改成了一个圆角的遮罩视图。
为了兼容老版本建议改成
if(_hideSegmentedLine) {
for (UIView *view in self.datePicker.subviews) {
if (view.frame.size.height <= 1) {
view.backgroundColor = UIColor.clearColor;
}
}
}
- (NSInteger)numberOfComponentsInPickerView:(UIPickerView *)pickerView { ///此处可以去除 ///[self addLabelWithName:self.manager.unitArray]; return self.manager.unitArray.count; }
在赋值时使用下面的方式
-(UIView *)pickerView:(UIPickerView *)pickerView viewForRow:(NSInteger)row forComponent:(NSInteger)component reusingView:(UIView *)view { //.......... title = [NSString stringWithFormat:@"%@%@",title,self.manager.unitArray[component]]; //.......... }
手机系统设置12小时制后,无法展示时间
年月类型的选择器点选月份闪退
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.