Latest 1.2.0
Homepage https://github.com/xiaozhuxiong121/PGPickerView
License MIT
Platforms ios 7.0, requires ARC
Frameworks UIKit
Authors

PGPickerView是将UIPickerView的弯曲弧度变成直列表,可以是单列表,多列表,还可以修改选中label的字体颜色等,用法跟UIPickerView一样。

CocoaPods compatible


PGPickerView.gif

内置3中样式

样式一

样式一

样式二

样式一

样式三

样式一

显示中间字

middle

CocoaPods安装

pod 'PGPickerView', '>= 1.2.0'

使用

PGPickerView *pickerView = [[PGPickerView alloc]initWithFrame:self.view.bounds];
pickerView.delegate = self;
pickerView.dataSource = self;
[self.view addSubview:pickerView];

#pragma PGPickerViewDataSource
- (NSInteger)numberOfComponentsInPickerView:(PGPickerView *)pickerView {
    return 2;
}

- (NSInteger)pickerView:(PGPickerView *)pickerView numberOfRowsInComponent:(NSInteger)component {
    return 10;
}
#pragma  PGPickerViewDelegate
- (nullable NSString *)pickerView:(PGPickerView *)pickerView titleForRow:(NSInteger)row forComponent:(NSInteger)component {
    return [NSString stringWithFormat:@"label%ld--%ld", component, row];
}

设置样式

//设置线条的颜色
pickerView.lineBackgroundColor = [UIColor redColor];
//设置选中行的字体颜色
pickerView.textColorOfSelectedRow = [UIColor blueColor];
//设置未选中行的字体颜色
pickerView.textColorOfOtherRow = [UIColor blackColor];

更多的使用方法请下载demo查看

想要所的话

喜欢的话扔一个免费的star,谢谢啦🌺

许可证

PGPickerView 使用 MIT 许可证,详情见 LICENSE 文件。

Latest podspec

{
    "name": "PGPickerView",
    "version": "1.2.0",
    "summary": "PGPickerViewu662fu5c06UIPickerViewu7684u5f2fu66f2u5f27u5ea6u53d8u6210u76f4u5217u8868uff0cu53efu4ee5u662fu5355u5217u8868uff0cu591au5217u8868uff0cu8fd8u53efu4ee5u4feeu6539u9009u4e2dlabelu7684u5b57u4f53u989cu8272u7b49u3002",
    "homepage": "https://github.com/xiaozhuxiong121/PGPickerView",
    "license": "MIT",
    "authors": {
        "piggybear": "[email protected]"
    },
    "platforms": {
        "ios": "7.0"
    },
    "source": {
        "git": "https://github.com/xiaozhuxiong121/PGPickerView.git",
        "tag": "1.2.0"
    },
    "source_files": [
        "PGPickerView",
        "PGPickerView/**/*.{h,m}"
    ],
    "frameworks": "UIKit",
    "requires_arc": true
}

Pin It on Pinterest

Share This