coder-zwz / dlpickerview Goto Github PK
View Code? Open in Web Editor NEW一种支持单列数据选择,多列数据选择,plist读取数据选择的多功能数据选择器,只需改变选择器NSArray数据源即可!
License: MIT License
一种支持单列数据选择,多列数据选择,plist读取数据选择的多功能数据选择器,只需改变选择器NSArray数据源即可!
License: MIT License
选择单行数据的时候,会出现如果不转动一下选项,就不能正确选择改值
修改如下
.m文件161行
if (self.selectedItem == nil) {
self.selectedItem = self.dataSource.firstObject;
} else {
if (![self.dataSource containsObject:self.selectedItem]) {
self.selectedItem = self.dataSource.firstObject;
}
}
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
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.