# NBLPickerView
[![CI Status](https://img.shields.io/travis/杨建红/NBLPickerView.svg?style=flat)](https://travis-ci.org/杨建红/NBLPickerView)
[![Version](https://img.shields.io/cocoapods/v/NBLPickerView.svg?style=flat)](https://cocoapods.org/pods/NBLPickerView)
[![License](https://img.shields.io/cocoapods/l/NBLPickerView.svg?style=flat)](https://cocoapods.org/pods/NBLPickerView)
[![Platform](https://img.shields.io/cocoapods/p/NBLPickerView.svg?style=flat)](https://cocoapods.org/pods/NBLPickerView)
## Example
To run the example project, clone the repo, and run `pod install` from the Example directory first.
## Requirements
## Installation
NBLPickerView is available through [CocoaPods](https://cocoapods.org). To install
it, simply add the following line to your Podfile:
```ruby
pod 'NBLPickerView'
```
## 用法一
```
NSArray *optionList = @[@"北京", @"天津", @"山西", @"河北"];
NBLPickerView *pickerView = [NBLPickerView showOptionList:optionList withIndexSel:1];
pickerView.constraintPickerViewHeight.constant = 200;
pickerView.titleBackgroundColor = [UIColor whiteColor];
pickerView.separatorColor = [UIColor redColor];
[pickerView.buttonLeft setTitle:@"左边" forState:UIControlStateNormal];
pickerView.labelTitle.text = @"在这里";
__weak typeof(self) weakSelf = self;
pickerView.blockClickLeftButton = ^BOOL(NSInteger index) {
NSLog(@"点击了左边的按钮");
return YES;
};
pickerView.blockClickRightButton = ^BOOL(NSInteger index) {
weakSelf.labelOption.text = optionList[index];
return YES;
};
```
### 预览 Preview
![NBLShareView_1](https://gitee.com/yjh4866/NBLPickerView/raw/master/screenshots/screenshots_1.png)
## 用法二
```
NBLPickerView *pickerView = [NBLPickerView showOptionList:^NSString * _Nonnull(NSInteger row) {
return [NSString stringWithFormat:@"%@年", @(1970+row)];
} withOptionCount:50 andIndexSel:10];
pickerView.constraintPickerViewHeight.constant = 200;
pickerView.titleBackgroundColor = [UIColor whiteColor];
pickerView.separatorColor = [UIColor blueColor];
pickerView.constraintLeftButtonWidth.constant = 120;
pickerView.labelTitle.text = @"在这里";
__weak typeof(self) weakSelf = self;
pickerView.blockClickRightButton = ^BOOL(NSInteger index) {
weakSelf.labelOption.text = [NSString stringWithFormat:@"%@年", @(1970+index)];
return YES;
};
```
### 预览 Preview
![NBLShareView_2](https://gitee.com/yjh4866/NBLPickerView/raw/master/screenshots/screenshots_2.png)
## Author
杨建红, yjh4866@163.com
## License
NBLPickerView is available under the MIT license. See the LICENSE file for more info.
没有合适的资源?快使用搜索试试~ 我知道了~
Object-C语言实现列表选择项目源码.zip
共61个文件
plist:9个
m:8个
xcconfig:7个
需积分: 5 1 下载量 7 浏览量
2024-02-18
19:36:28
上传
评论
收藏 278KB ZIP 举报
温馨提示
Object-C语言实现列表选择项目源码.zipObject-C语言实现列表选择项目源码.zipObject-C语言实现列表选择项目源码.zip
资源推荐
资源详情
资源评论
收起资源包目录
Object-C语言实现列表选择项目源码.zip (61个子文件)
screenshots
screenshots_2.png 151KB
screenshots_1.png 130KB
.travis.yml 557B
NBLPickerView
Assets
NBLPickerView.xib 12KB
.gitkeep 0B
Classes
NBLPickerView.m 6KB
NBLPickerView.h 1KB
.gitkeep 0B
Example
Podfile 189B
NBLPickerView.xcodeproj
xcshareddata
xcschemes
NBLPickerView-Example.xcscheme 4KB
project.pbxproj 28KB
project.xcworkspace
contents.xcworkspacedata 158B
NBLPickerView
Images.xcassets
AppIcon.appiconset
Contents.json 2KB
NBLViewController.h 217B
Base.lproj
Main.storyboard 6KB
LaunchScreen.storyboard 2KB
main.m 338B
NBLAppDelegate.m 2KB
NBLViewController.m 2KB
NBLAppDelegate.h 279B
NBLPickerView-Info.plist 2KB
NBLPickerView-Prefix.pch 321B
en.lproj
InfoPlist.strings 45B
NBLPickerView.xcworkspace
xcshareddata
IDEWorkspaceChecks.plist 238B
contents.xcworkspacedata 231B
Pods
Pods.xcodeproj
project.pbxproj 42KB
Manifest.lock 285B
Local Podspecs
NBLPickerView.podspec.json 1011B
Target Support Files
NBLPickerView
NBLPickerView-prefix.pch 195B
ResourceBundle-NBLPickerView-NBLPickerView-Info.plist 733B
NBLPickerView.release.xcconfig 598B
NBLPickerView.xcconfig 409B
NBLPickerView-dummy.m 130B
NBLPickerView-umbrella.h 344B
NBLPickerView-Info.plist 828B
NBLPickerView.modulemap 116B
NBLPickerView.debug.xcconfig 598B
Pods-NBLPickerView_Tests
Pods-NBLPickerView_Tests-acknowledgements.plist 805B
Pods-NBLPickerView_Tests.release.xcconfig 689B
Pods-NBLPickerView_Tests-umbrella.h 340B
Pods-NBLPickerView_Tests-Info.plist 828B
Pods-NBLPickerView_Tests.modulemap 138B
Pods-NBLPickerView_Tests-acknowledgements.markdown 133B
Pods-NBLPickerView_Tests.debug.xcconfig 689B
Pods-NBLPickerView_Tests-dummy.m 152B
Pods-NBLPickerView_Example
Pods-NBLPickerView_Example-Info.plist 828B
Pods-NBLPickerView_Example-dummy.m 156B
Pods-NBLPickerView_Example-acknowledgements.plist 2KB
Pods-NBLPickerView_Example-umbrella.h 344B
Pods-NBLPickerView_Example.debug.xcconfig 784B
Pods-NBLPickerView_Example.release.xcconfig 784B
Pods-NBLPickerView_Example.modulemap 142B
Pods-NBLPickerView_Example-acknowledgements.markdown 1KB
Pods-NBLPickerView_Example-frameworks.sh 8KB
Tests
Tests-Prefix.pch 132B
Tests-Info.plist 674B
en.lproj
InfoPlist.strings 45B
Tests.m 624B
Podfile.lock 285B
_Pods.xcodeproj
NBLPickerView.podspec 2KB
README.md 3KB
共 61 条
- 1
资源评论
唐先生的博客
- 粉丝: 2211
- 资源: 528
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功