ReactiveCocoa bi-directional bind in UITableViewCell <p>I've got <code>UITableView</code> with server list. The possible actions are:</p> <ul> <li>add server </li> <li>delete server</li> <li>save data (current server list)</li> </ul> <p>Each <code>UITableViewCell</code> contains 2 <code>UITextField</code> with server name and server url.</p> <p>There is also validation required which disables addButton if ANY <code>textfield</code> is empty (user can edit any visible record with server name/url)</p> <p>So far I managed to bind viewModel with <code>textfields</code> so editing <code>textfield</code> fills the model data. The problem is with opposite direction. When I delete row using code below </p> <pre><code>- (void)removeCellAtIndexPath:(NSIndexPath *)indexPath { [self.viewModel.tempServerList removeObjectAtIndex:indexPath.row]; if (![self.viewModel.tempServerList count]) { self.buttonAdd.enabled = YES; } [self.tableView beginUpdates]; [self.tableView deleteRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationFade]; [self.tableView endUpdates]; } </code></pre> <p>And add again new cell, it is already filled with previous (deleted) data. Possible workaround is custom init method + settings the text fields empty. Is is another way to bind it bi-directional <code>TextField</code> with model?</p> <pre><code>- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { ServerTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:[[ServerTableViewCell class] description]]; RACSignal *nameSignal = [cell.textFieldServerName.rac_textSignal takeUntil:cell.rac_prepareForReuseSignal]; RACSignal *urlSignal = [cell.textFieldServerURL.rac_textSignal takeUntil:cell.rac_prepareForReuseSignal]; RAC([self.viewModel.tempServerList objectAtIndex:indexPath.row], name) = nameSignal; RAC([self.viewModel.tempServerList objectAtIndex:indexPath.row], url) = urlSignal; [[[RACSignal combineLatest:@[nameSignal, urlSignal] reduce:^(NSString *name, NSString *url) { for (ServerDataModel *serverData in self.viewModel.tempServerList) { if (!serverData.name.length || !serverData.url.length) { return @NO; } } return @YES; }] takeUntil:cell.rac_prepareForReuseSignal] subscribeNext:^(NSNumber *x) { self.buttonAdd.enabled = x.boolValue; }]; cell.delegate = self; cell.indexPath = indexPath; return cell; } </code></pre>