Skip to content

pabloroca/pr2_ModalDatePicker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

pr2_ModalDatePicker

A modal UIDatePicker with a semi transparent background. The goal was to keep as simple as possible.

pr2_ModalDatePicker

Installation

If your project doesn't use ARC: you must add the -fobjc-arc compiler flag to pr2_ModalDatePicker.m in Target Settings > Build Phases > Compile Sources.

  • Drag the pr2_ModalDatePicker/pr2_ModalDatePicker folder into your project.

Usage

(see sample Xcode project in /Example)

Import pr2_ModalDatePicker.h, set the delegate, call presentModalwithDate with the date to be the default for the UIDatePicker and finally use the callback delegates

#import <pr2_ModalDatePicker.h>
@interface myViewController : UIViewController <pr2_ModalDatePickerDelegate>

...

pr2_ModalDatePicker *datePicker = [[pr2_ModalDatePicker alloc] initWithNibName:@"pr2_ModalDatePicker" bundle:nil];
	
datePicker.delegate = self;

NSDate *tdate = [NSDate date];
[datePicker presentModalwithDate:tdate];

And set the delegate callbacks

-(void)pr2datePickerCancel
{
}

-(void)pr2datePickerClear
{
	self.lbldate.text = @"";
	self.mydate = nil;
}

-(void)pr2datePickerSave:(NSDate *)tdate
{
	self.lbldate.text = [self.dateFormatter stringFromDate:tdate];
	self.mydate = tdate;
}

Who use it

Find out who use pr2_ModalDatePicker and add your app to the list.

Licenses

All source code is licensed under the MIT License.

Credits

pr2_ModalDatePicker is brought to you by Pablo Roca Rozas & PR2Studio and contributors to the project. If you have feature suggestions or bug reports, feel free to help out by sending pull requests or by creating new issues. If you're using pr2_ModalDatePicker in your project, attribution would be nice or drop me an email saying hello.

About

A modal UIDatePicker with a semi transparent background

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published