博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
去掉UIPickerView的弯曲弧度
阅读量:7042 次
发布时间:2019-06-28

本文共 868 字,大约阅读时间需要 2 分钟。

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

#GitHub Address https://github.com/xiaozhuxiong121/PGPickerView

Installation with CocoaPods

pod 'PGPickerView'复制代码

Usage

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];}复制代码

转载于:https://juejin.im/post/5a312ce26fb9a0451a766252

你可能感兴趣的文章
Executors submit()使用场景
查看>>
ReentrantReadWriteLock类的使用
查看>>
centos下安装五笔
查看>>
spring eureka-server配置
查看>>
ul动态生成li(JavaScript写)
查看>>
android自定义TabWidget
查看>>
SPRINGBOOT 使用技巧总结
查看>>
使用@ResponseBody返回Json格式数据时的配置
查看>>
解决ADB版本不兼容的问题
查看>>
42.Tornado WEB服务器入门
查看>>
递归、闭包、私有变量、特权方法、单例、模块模式(module pattern)
查看>>
java Annotations(批注)
查看>>
Linux利用OneinStack搭建环境
查看>>
写一个简单的运行Django项目的脚本
查看>>
Django
查看>>
解决 ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YE
查看>>
iOS开发如何实现消息推送机制
查看>>
Android xml application属性详解
查看>>
Android Push Notification实现信息推送使用
查看>>
elk6.4(rpm)安装及kibana汉化
查看>>