Refactored iOS DatePicker plugin #363

merged 5 commits into from Feb 22, 2012


None yet

2 participants


This is a major refactor of the iOS DatePicker plugin to make it play nice with iOS. The previous version was not implementing the standard Objective-C patterns for memory management or delegation. This refactor provides the following;

  • Better memory management of all native iOS components (not using ARC)
  • Uses the UIActionSheetDelegate protocol to send selected date back to PhoneGap
  • Unloads the logic from the Back button segmented control
  • Uses ISO standard dates for communication between Objective C and JS to ensure no ambiguity
  • If no mode is sent to the control, UIDatePickerModeDateAndTime is used
samsoir added some commits Feb 22, 2012
@samsoir samsoir Updated the DatePicker class to use standard iOS conventions for dele…
…gation and memory management
@samsoir samsoir Fixed a few minor errors with releasing to early. Also ensure the JS …
…returns the date to the PG JS client
@samsoir samsoir Using ISO standard date formatting within the iOS DatePicker.m class 396e3f4
@samsoir samsoir Created a new datetime mode to allow date and time to be sent 3d12767
@samsoir samsoir More refactoring of the DatePicker implmentation. Created one init me…
…thod for the ActionSheet that accepts its dependencies via DI. All date handling is now internationally recognised ISO. DatePicker will default to UIDatePickerModeDateAndTime unless specified otherwise. All memory is managed properly, making DatePicker plugin play nice in iOS (without ARC)
@shazron shazron merged commit d07bc00 into phonegap:master Feb 22, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment