MGA
MGA

Reputation: 3751

Proper MVC architecting in iOS

I'm fairly new to iOS development and I'm having trouble seeing the benefit of the presented MVC approach. I've been moving away from using nib files and doing things programatically (since custom controls aren't supported by nibs) and I'm really disliking the high coupling between the view and the viewcontroller. All of the view creation code is in the viewcontroller. Is this by design? I would much rather create a separate class representing the view and simply add that one view in my viewcontrolller. Is this possible and good design?

Your input would be greatly appreciated!

Thanks, Matt

Upvotes: 3

Views: 305

Answers (1)

Jhaliya - Praveen Sharma
Jhaliya - Praveen Sharma

Reputation: 31722

I would much rather create a separate class representing the view and simply add that one view in my viewcontrolller.

That's the best approach, because if you add each views in controller then you controller will end up having unmaintainable code,

Upvotes: 3

Related Questions