Changing the value of an XLFORM string

I am using XLFORM library with speed, I want to clear the string value after a successful request.

I am trying to get a string object using self.form.formRowWithTag and changing the value using .value, but unfortunately I can not get the string object: (

can anyone help with this?

+4
source share
2 answers

I also searched for this answer, and your answer gave me inspiration.

What you have done so far is correct. Here is the code:

self.form.formRowWithTag("whatever-tag").value = nil
self.tableView.reloadData()

The key is to reboot UITableView

Hope this helps =)

+5
source

While the above answer may work, I found out how to do it as the author of XLForm wants. On XLForm Github, the author says:

, , , . -(void)reloadFormRow:(XLFormRowDescriptor *)formRow XLFormViewController .

, :

var row = self.form.formRowWithTag("whatever-tag")
row.value = nil
self.reloadFormRow(row)

, .

+2

All Articles