Git Product home page Git Product logo

cxdatepickerview's Issues

分类名字冲突

既然发布到pod上,引用的分类方法名字,应该带一个前缀,避免与其他分类名字冲突,而且分类只用到了两个方法,希望能精简一下

iOS14 适配

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]]; //.......... }

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.