1

Per MVC design pattern as in GOF, "a view can be disabled so that it doesn't accept input simply by giving it a controller that ignores input events". That means, we decide a view first and then pick a suitable controller to that as the scenario needed.

But iOS storyboard based development is primarily driven by Controller (instantiateViewControllerWithIdentifier) and a view (scene) is tightly bound to a Controller Class. Does this mean iOS lacks this MVC feature? And we are not doing MVC to its full potential?

Can someone help to clarify this?

Thanks.

1

Generally in iOS if you want a view not to respond you should set it to not be enabled for user interactions by calling -[UIView setUserInteractionEnabled:NO]. So it supports MVC just fine, it just does it differently (and in my opinion more intuitively) than the way suggested in GOF.

  • User interaction just one aspect. A context can ask for a controller with different business logic and different level of user interactions. – Saran May 6 '17 at 16:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.