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.
Am not sure how helpful this might be to you, but in my case, when so many controls need to take action on a limited / constrained set of conditions, then my approaches are:

1. Disable all controls by default, and only enable any, when the conditions required for it's use are met. This ensures that the user gets a visual cue of when they can use a control, but takes more work, since it requires that we check when the conditions are lost such that the control can be disabled again.
2. Have all controls enabled / available by default, but only take action / respond to user action only if the required conditions are met.

But like you might tell, these approaches might not generalize well, and you might need to implement some sort of pattern / interface that observes actions / context on behalf of the controls, and then turns them on/off when the right conditions are met.