Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7641535
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T08:56:55+00:00 2026-05-31T08:56:55+00:00

Overview I am doing an iOS project using the MVC architecture. Pardon my ignorance,

  • 0

Overview

  • I am doing an iOS project using the MVC architecture. Pardon my ignorance, I am just confused, I am looking for a good design.
  • The view I am planning to use will have some buttons on it and some labels and text fields. My view wouldn’t need any custom
    implementation of drawRect.
  • All my logic as to what needs to be done when a button is pressed or event occurs is in my view controller

I have a couple of doubts:

  1. for the above scenario, is it still better (good practice) to create a separate view (a view other than view controller’s view) ? If so why ?

  2. Other than drawing and displaying the view (in my project, I don’t have much of it) what else should a view’s implementation code
    contain ?

  3. I would like to disable a set of buttons when the user touches on a textfield and the keyboard comes up.

    a) So should I place this logic of disabling some buttons in the separate view’s implementation (view created in question 1) ?

    b) From my parent view (view created in question 1), can I create outlets to the buttons (which are subviews) to disable some of the buttons ? I am not able to do this. Or should I use the method subviews and loop through the button that i am looking for ?

My understanding

  1. Model contains the data

  2. View is responsible for displaying and shouldn’t contain business
    logic.

  3. View controller is the only one to interact between the model and the view and contains the business logic
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T08:56:57+00:00Added an answer on May 31, 2026 at 8:56 am
    1. There’s no need to create a separate view — the view controller’s view (usually just a plain UIView) can certainly contain your buttons and text fields. If you did want to put some of those in a separate container (perhaps so that you could move them as a group), you could use a plain old UIView for that.

    2. Views are responders, so UIView subclasses can override the touch handling methods if you want to do any special touch handling.

    3. a) It’s common to put the code that manages views (such as disabling buttons) in the view controller. b) Again, you’d normally put the outlets for your buttons in the view controller.

    When people talk about “business logic” they usually mean the logic that’s required to maintain and operate on the data that the application deals with. That sort of thing is often best placed in the model. On the other hand, code that manages views, such as enabling or disabling buttons or moving data from the model into views (or vice versa) belongs in the view controller.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Overview I have an iOS project which contains 2 navigation controllers as shown in
Overview I am using CompositeWPF to create an app using C#. This really should
Overview I am trying to get a photo feed on to my site using
Overview I'm looking for advice / solutions on standardizing color profiles on comps so
I am doing my project in struts2 and i have created the login pages
I am looking people's opinion and experience on using chart controls within an ASP.NET
Context PHP 5.3.x Overview After doing a code-review with an associate who uses both
im looking for a free version of the following http://demos.telerik.com/aspnet-ajax/dock/examples/overview/defaultcs.aspx and wondered if anyone
Here is a brief overview of what I am doing, it is quite simple
I'm currently working on an MVC based PHP project. My script basically will be

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.