xmartlabs / XLForm

XLForm is the most flexible and powerful iOS library to create dynamic table-view forms. Fully compatible with Swift & Obj-C.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Row value assigned too late, otherwise nil

RobertAudi opened this issue · comments

First of all, I'd like to thank you for this wonderful library. Great work 👍

Now about the issue:

Let's say I have a text field cell. Unless the focus moves away from the text field (ie: the keyboard has been dismissed or the user went to the next text field), [[self.form formRowWithTag:@"title"] value] returns nil regardless of the contents of the text field. That would be wrong if the text field's text is not empty. So consider this scenario:

  1. The user taps on the text field
  2. The user enters a value
  3. The user taps on the "Done" button

At this point, there is a problem because the value of the text field is nil even though it shouldn't be.

This should be fixed now in 1.0.1

First I have to say that I am in love with XLForm !

I was able to bypass the issue using a subclass of XLFormViewController:

override -(void) savePressed:(UIBarButtonItem *)saveButton
and add [self.view endEditing:YES];

Hope that it help!

@RobertAudi , @gutoperes happy to hear that!
This fix will be released on 1.0.1 version.