Code Monkey home page Code Monkey logo

irdatapicker's Introduction

Build Status Platform

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

#import <IRDataPicker/IRDataPicker.h>
IRDataPicker *datePicker = [[IRDataPicker alloc]init];
[self.view addSubview:datePicker];

datePicker.selectedDate = ^(NSDateComponents *dateComponents) {
    NSLog(@"dateComponents = %@", dateComponents);
};

Advanced settings

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

irdatapicker's People

Contributors

irons163 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

mohsinalimat

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.