Refactored iOS DatePicker plugin #363

Merged
merged 5 commits into from Feb 22, 2012

Conversation

Projects
None yet
2 participants
@samsoir

samsoir commented Feb 22, 2012

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

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 added a commit that referenced this pull request Feb 22, 2012

Merge pull request #363 from samsoir/master
Refactored iOS DatePicker plugin

@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