Latest 1.0.4
Homepage https://github.com/nhfc99/NHFHorizontalPickerView
License MIT
Platforms ios 8.0, requires ARC
Frameworks Foundation, CoreGraphics, UIKit
Authors

介绍

左右滑动选择文本数据

安装

  • pod ‘NHFHorizontalPickerView’
  • 手动下载然后将文件夹拖至工程中即可

使用方法

NSMutableArray *array = [NSMutableArray new];
for (int i=1; i<200; i++) {
[array addObject:[NSString stringWithFormat:@"%d", i]];
}

CGFloat offset = 49.f;
HorizontalPickerView horizontalPickerView = [[HorizontalPickerView alloc] initWithFrame:CGRectMake(offset, offset, CGRectGetWidth(self.view.frame)-2offset, offset) minimumLineSpacing:8];
[horizontalPickerView setBackgroundColor:[UIColor grayColor]];
[horizontalPickerView setResource:array];
horizontalPickerView.horizontalPickerViewSelect = ^(NSString *object) {
NSLog(@"object = %@", object);
};
[self.view addSubview:horizontalPickerView];

效果图

运行效果

Latest podspec

{
    "name": "NHFHorizontalPickerView",
    "version": "1.0.4",
    "summary": "u5de6u53f3u6ed1u52a8u9009u62e9u6587u672cu6570u636e",
    "homepage": "https://github.com/nhfc99/NHFHorizontalPickerView",
    "license": "MIT",
    "authors": {
        "u725bu5b8fu98de": "[email protected]"
    },
    "source": {
        "git": "https://github.com/nhfc99/NHFHorizontalPickerView.git",
        "tag": "1.0.4"
    },
    "platforms": {
        "ios": "8.0"
    },
    "requires_arc": true,
    "source_files": [
        "NHFHorizontalPickerView/HorizontalPickerView/*.{h,m}",
        "NHFHorizontalPickerView/HorizontalPickerView/HorizontalPickerViewUICollectionViewCell/*.{h,m}"
    ],
    "frameworks": [
        "Foundation",
        "CoreGraphics",
        "UIKit"
    ]
}

Pin It on Pinterest

Share This