📅 UIDatePicker modally presented with iOS 7 custom transitions.
Objective-C
Latest commit 9fc2bb1 Aug 2, 2016 @alikaragoz committed on GitHub Merge pull request #4 from lfarah/patch-1
Added Installation section
Permalink
Failed to load latest commit information.
AIDatePickerController Fixes #1 Dec 18, 2014
Demo Fixes #1 Dec 18, 2014
github-assets Initial commit. Nov 6, 2013
.gitignore Fixes #1 Dec 18, 2014
LICENSE Initial commit. Nov 6, 2013
README.md Added a space Aug 2, 2016

README.md

AIDatePickerController

Installation

Manually

  1. Download and drop /AIDatePickerControllerfolder in your project.
  2. Congratulations!

Usage

// Create a date
NSDateFormatter *dateFormatter=[[NSDateFormatter alloc] init];
[dateFormatter setDateFormat:@"yyyy-MM-dd"];
NSDate *date = [dateFormatter dateFromString:@"1955-02-24"];


// Create an instance of the picker
AIDatePickerController *datePickerViewController = [AIDatePickerController pickerWithDate:date selectedBlock:^(NSDate *selectedDate) {
    // Do what you want with the picked date.
} cancelBlock:^{
    // Do what you want when the user pressed the cancel button.
}];

// Present it
[self presentViewController:datePickerViewController animated:YES completion:nil];

Requirements

  • iOS >= 7.0
  • ARC

Credits

Inspired by Roland Moers's RMDateSelectionViewController.

Contact

Ali Karagoz

License

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