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.

asked May 5, 2017 at 19:35

1 Answer 1

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.

answered May 6, 2017 at 2:50
1
  • User interaction just one aspect. A context can ask for a controller with different business logic and different level of user interactions. Commented May 6, 2017 at 16:32

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.