nativescript-timedatepicker icon indicating copy to clipboard operation
nativescript-timedatepicker copied to clipboard

Feature request CANCEL button callback for iOS

Open jolee11 opened this issue 7 years ago • 2 comments

I would like to know how to determine user has pressed CANCEL button! Or, could I disable the CANCEL?

jolee11 avatar Jun 18 '17 09:06 jolee11

The CANCEL callback is not implemented but you can add it to the delegate following the same logic as actionSheetPickerViewDidSelectDate(pickerView: IQActionSheetPickerView, date: NSDate)

Objective-C

  • (void)actionSheetPickerViewDidCancel:(nonnull IQActionSheetPickerView *)pickerView;

Just let me know if you have some problems and we can add it for everyone to enjoy :-D

AntonioCuevaUrraco avatar Jun 19 '17 06:06 AntonioCuevaUrraco

The problem is:

Android does not have this [CANCEL] button but iOS does.

When I allocated many resources before calling the datePicker, and waiting for the [Done] button callback to release those resources, I never have a chance to release the allocated resources if the [CANCEL] button is tapped.

So, a potential memory leak when user just keeping tap [CANCEL] button for each call.

Thank you very much!

jolee11 avatar Jun 21 '17 09:06 jolee11