Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/irons163/irdatapicker
IRDataPicker is a powerful data picker framework for iOS.
https://github.com/irons163/irdatapicker
custompicker datapicker datepicker datepicker-component ios objc
Last synced: about 2 months ago
JSON representation
IRDataPicker is a powerful data picker framework for iOS.
- Host: GitHub
- URL: https://github.com/irons163/irdatapicker
- Owner: irons163
- License: mit
- Created: 2019-07-24T04:26:18.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-08-15T09:53:40.000Z (over 5 years ago)
- Last Synced: 2024-10-31T08:15:38.975Z (2 months ago)
- Topics: custompicker, datapicker, datepicker, datepicker-component, ios, objc
- Language: Objective-C
- Homepage:
- Size: 153 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
![Build Status](https://img.shields.io/badge/build-%20passing%20-brightgreen.svg)
![Platform](https://img.shields.io/badge/Platform-%20iOS%20-blue.svg)# IRDataPicker
##### This project is copy and change from PGDatePicker. Implemet custom data picker.
- IRDataPicker is a powerful data picker framework for iOS.
## Features
- Date picker.
- Custom data picker.## Install
### Cocoapods
- Add `pod 'IRDataPicker'` in the `Podfile`
- `pod install`## Usage
- more examples in the demo applications.
### Basic
```obj-c
#import
``````obj-c
IRDataPicker *datePicker = [[IRDataPicker alloc]init];
[self.view addSubview:datePicker];datePicker.selectedDate = ^(NSDateComponents *dateComponents) {
NSLog(@"dateComponents = %@", dateComponents);
};
```### Advanced settings
```obj-c
IRDataPickerManager *datePickManager = [[IRDataPickerManager alloc]init];
IRDataPicker *datePicker = datePickManager.datePicker;
datePicker.showUnit = IRShowUnitTypeNone;
datePicker.isHiddenMiddleText = NO;UIColor *headerColor = [UIColor redColor];
datePickManager.titleLabel.text = @"";
//设置半透明的背景颜色
datePickManager.isShadeBackgroud = true;
//设置头部的背景颜色
datePickManager.headerViewBackgroundColor = headerColor;
//设置线条的颜色
datePicker.lineBackgroundColor = headerColor;
//设置选中行的字体颜色
datePicker.textColorOfSelectedRow = headerColor;
//设置未选中行的字体颜色
datePicker.textColorOfOtherRow = [UIColor blackColor];
//设置取消按钮的字体颜色
datePickManager.cancelButtonTextColor = [UIColor whiteColor];
//设置取消按钮的字
datePickManager.cancelButtonText = @"Cancel";
//设置取消按钮的字体大小
datePickManager.cancelButtonFont = [UIFont boldSystemFontOfSize:17];//设置确定按钮的字体颜色
datePickManager.confirmButtonTextColor = [UIColor whiteColor];
//设置确定按钮的字
datePickManager.confirmButtonText = @"Done";
//设置确定按钮的字体大小
datePickManager.confirmButtonFont = [UIFont boldSystemFontOfSize:17];
```## Screenshots
![Demo](./demo/ScreenShots/demo1.png)
![Demo](./demo/ScreenShots/demo2.png)