Giter Club home page Giter Club logo

dlpickerview's People

Contributors

coder-zwz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

dlpickerview's Issues

提一个小BUG

选择单行数据的时候,会出现如果不转动一下选项,就不能正确选择改值

修改如下
.m文件161行

if (self.selectedItem == nil) {
            self.selectedItem = self.dataSource.firstObject;
        } else {
            if (![self.dataSource containsObject:self.selectedItem]) {
                self.selectedItem = self.dataSource.firstObject;
            }
        }

picker错误不出现

DLPickerView.m文件第124行,为cls赋值的时候,假设处理的字符串较短并且全为英文,处理的string类型将为: NSTaggedPointerString,其他情况下,处理的string类型将为: __NSCFString;
虽然同为NSString子类,但135行到139行的处理将会出问题。
建议将124行到139行的处理转换为:

            if (idx == 0) {
                
                if (isArray(obj)) {
                    cls = [NSArray class];
                    weakSelf.isSingleColumn = NO;
                } else if (isString(obj)) {
                    cls = [NSString class];
                    weakSelf.isSingleColumn = YES;
                } else {
                    weakSelf.isDataSourceValid = NO;
                    return;
                }
            } else {
                if (![obj isKindOfClass:cls]) {
                    weakSelf.isDataSourceValid = NO;
                    *stop = YES;
                    return;
                }
                

NSString 内存处理引用 http://www.jianshu.com/p/0e98f37114e3

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.