Skip to content

UIDatePickerView random crash #23

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];
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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