My app has many views and their respective controllers. Now I have a set of model classes with business logic in them. One of the model classes(subclass of NSObject) has the res
You could add a delegate in the class that is listening to the server and so when it gets that message it just calls disable on whomever its delegate is. Whichever view is showing to get the message as well as normal execution until the message is received. If it is a singleton just set the view as the delegate on viewWillAppear.
Another viable option is to use the notification center. So when your class gets the disable message just do
[[NSNotificationCenter defaultCenter] postNotificationName:@"disableView" object:nil];
and when your views load add them to listen
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(disableView:) name:@"disableView" object:nil];
Then stop listening when they aren't needed.
Subclassing UIViewController and implementing the disable functionality and then subclassing that class in all other view controllers would eliminate the duplication of code.