Skip to content

UIDatePickerView random crash #23

@resh32

Description

@resh32

There was a problem when using FKFormAttributeMappingTypeDate and rolling the date while simultaneously dismissing the datepicker window. If done at the right moment, the app would crash. The exact moment is to close while the datepicker is stabilizing.

The problem is related to:

[datePicker addTarget:self action:@selector(eventForDatePicker:) forControlEvents:UIControlEventValueChanged];

If the pickerview is dismissed while that event is sent, the app will crash.

A possible solution is to unregister event when the ActionSheetDatePicker is dealloced:

- (void)dealloc {
 [((UIDatePicker*)self.pickerView) removeTarget:self action:@selector(eventForDatePicker:) forControlEvents:UIControlEventValueChanged];
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions