Question: In my app I am doing tableView. By clicking row, the new view will navigate. Before navigation of new view, application is processing data from server. Until processing of data finished, view will not navigate. In this time period I want to disable userinteraction of tableview, so user can not select further rows.

```
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
    tableView.userInteractionEnabled = NO;
}

```

Note that, When I again come back to the tableview, user will again allowed to select any row.
I do not have any idea, how can I enable userinteracation again.

Answer: 
Well in WPF there was something called the Visual State Manager. You could implement something similar in WinForms. Basically your form could have state, and control modifications should only be allowed in states. Then you call a transition to change state. At least all the modification code could then be squirrelled away in methods somewhere called by the state manager.

<http://windowsclient.net/wpf/wpf35/wpf-35sp1-toolkit-visual-state-manager-overview.aspx>

In WPF I think there is some sort of designer support. It would be possible in WinForms following something like how localisation works on forms, but it's involved.

I did a crude state manager for one project that took a list of string state names and corresponding delegates to methods to call, then it's just good practice to keep all modification code in methods and not decorated about the form.
I have one solution to over come the above mentioned problem if we are using object model then it will be easy to maintain the state of all controls.