Coder Social home page Coder Social logo

isabella232 / pidatepicker Goto Github PK

View Code? Open in Web Editor NEW

This project forked from prolificinteractive/pidatepicker

0.0 0.0 0.0 214 KB

[DEPRECATED] A customizable implementation of UIDatePicker, written in Swift.

License: MIT License

Ruby 3.82% Objective-C 0.71% Swift 95.47%

pidatepicker's Introduction

[DEPRECATED] PIDatePicker

⚠️ This repository is no longer maintained or supported. New pull requests will not be reviewed. ⚠️

PIDatePicker

Description

A custom UIDatePicker object that allows design customization of various user interface attributes such as font, color, etc. This pod aims to replicate the default UIDatePicker functionality while adding additional customization in the user interface.

Usage

PIDatePicker is available through Cocoapods.

The source code is available on GitHub.

To use in your projects, simply add the following line to your Podfile:

pod "PIDatePicker", '~> 0.1.0'

You can then use PIDatePicker by importing it into your files:

import PIDatePicker

Because this project was written in Swift, your project must have a minimum target of iOS 8.0 or greater. Cocoapods does not support Swift pods for previous iOS versions. If you need to use this on a previous version of iOS, import the code files directly into your project or by using git submodules.

Customization

There are several options available for customizing your date picker:

Property Type Description
font UIFont Sets the font that the date picker will use to display the dates. By default, it uses a system font of size 15.
textColor UIColor Set the color of the text. By default, it uses UIColor.blackColor().
backgroundColor UIColor Set the background color of the date picker. By default, it is a clear color.
minimumDate UIDate The minimum selectable date allowed by the date picker. Defaults to NSDate.distantPast().
maximumDate UIDate The maximum selectable date allowed by the date picker. Defaults to NSDate.distantFuture().
locale NSLocale The locale of the calendar used for formatting the date. By default, this uses the device's locale.

The following public methods are available for calling in your module:

Method Description
reloadAllComponents() Reloads all of the components of the date picker.
setDate(date: NSDate, animated: Bool) Sets the current date of the date picker.

Delegate

A class can implement PIDatePickerDelegate and the following method to respond to changes in user selection.

func pickerView(pickerView: PIDatePicker, didSelectRow row: Int, inComponent component: Int)

Contributing

To report a bug or enhancement request, feel free to file an issue under the respective heading.

If you wish to contribute to the project, fork this repo and submit a pull request.

License

PIDatePicker is available under the MIT license. See the LICENSE file for more info.

pidatepicker's People

Contributors

aashcherbakov avatar atecle avatar danielt1263 avatar haud avatar htinlinn avatar jlmendezbonini avatar jstnheo avatar mluedke2 avatar orkhanalikhanov avatar pedrosebastiao avatar schjonhaug avatar

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.