Latest 0.0.1
Homepage https://github.com/sunhua163/FastPickerView
License MIT
Platforms ios 8.0, requires ARC
Authors

这是一个pickerView的控件

推荐Pod方式

 pod 'FastPickerView'

开发思路

需求有时候pickerview中有一列,有时候有两列,这个时候,我们需要实现UIPickerViewDelegate,UIPickerViewDataSource,
这就使得我们多了很多鸡肋的代码,事实上,我们只关注选中了哪个!!
有时候UI精(jian)益(zhi)求(zuo)精(si),要求更改pickerView中字体样式

CustomPickerAgent

dataSource 是一个包含数组的数组,dataSource中有几个数组,代表有几列
dataValueForKeys 是一个字符串数组,分别对应 dataSource中每组对象的属性key值,在代码实现中通过valueforkey获取对象对应的此属性的值
以下这两个代理方法分别负责选中cell的事件以及自定义cell样式 可以搞定一切

  • (void)customPickerView:(UIPickerView )pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component chooseObj:(NSObject )chooseObj;

  • (UILabel *)customPickerLabel;

Latest podspec

{
    "name": "FastPickerView",
    "version": "0.0.1",
    "summary": "FastPickerView can creat pickerView fast.",
    "description": "u8fd9u662fu4e00u4e2au5173u4e8epickerViewu7684u6846u67b6uff0cu53efu4ee5u4fbfu6377u7684u66f4u6539pickerViewu7684u6837u5f0fu4ee5u53cau4feeu6539u80ccu666fu8272",
    "homepage": "https://github.com/sunhua163/FastPickerView",
    "license": {
        "type": "MIT",
        "file": "FILE_LICENSE"
    },
    "authors": {
        "sunhua": "[email protected]"
    },
    "source": {
        "git": "https://github.com/sunhua163/FastPickerView",
        "tag": "0.0.1"
    },
    "source_files": [
        "Classes",
        "FastPickerView/FastPickerView/**/*.{h,m}"
    ],
    "exclude_files": "Classes/Exclude",
    "requires_arc": true,
    "platforms": {
        "ios": "8.0"
    }
}

Pin It on Pinterest

Share This