Closed roland9 closed 9 years ago
There is a simple workaround for this issue: call endEditing
before opening the AlertView:
[self.view endEditing:YES];
That closes the XLFormDatePickerCell
and thus no duplicates are created
@roland9,
You have to use UIAlertController in iOS 8 since UIAlertView is deprecated. We test the issue using that and it works fine.
I just make a pull request replacing all UIAlertView and UIActionSheet for UIAlertController. Thanks for reporting
Regards, Martin
Issue Description
If you use an inline date cell (
XLFormRowDescriptorTypeDateInline
) in your form, there is an issue if you have UIAlertViews: after the Alert View closes, the form adds a secondXLFormDatePickerCell
as shown in the screenshot.Note: This issue is only happening on SDK >= iOS 8.3. It's not reproducible on < iOS 8.3. So I assume in iOS 8.3 the handling of the firstResponder after the alert view closes has been changed. Note 2: This issue also happens if you use the iOS 8 only UIAlertController instead of the UIAlertView.
How to reproduce:
viewDidLoad
of theDatesFormViewController
in the XLForm example project:UIAlertView
shows up. Tap Cancel.XLFormDatePickerCell
cells now.Details:
Here is the call stack - seems UIKit is calling
becomeFirstResponder
, and that causes the newXLFormDatePickerCell
to be created: