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

  • SEARCH
  • Home
  • 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 6057555
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T08:30:05+00:00 2026-05-23T08:30:05+00:00

I am writing a fairly complex iPad app – my first bigger one. This

  • 0

I am writing a fairly complex iPad app – my first bigger one.

This app has some custom UIViews that present fairly complex data, including a table. These views do not take up the whole screen, and there can (and likely will) be many of them on screen at any time (though only one would be in an “expanded” state where the table is shown).

Here’s a basic example that should convey the basic principle: Made with the nice Antetype prototyping app

Please note that these things are not supposed to be in popovers; instead, the FamilyViews expand to show their detailed data. (And please also note that this mockup was only created for the sake of this question and has little to do with how my interface is going to look; I know this is not good screen design)

I’m undecided on who to put as the delegate and datasource of these custom views:

  • Making the ViewController for the current screen delegate and datasource is unelegant, because it’s not just one table that’s part of the VC’s main view.
  • Making the View itself the delegate and datasource seems a bit weird to me because it feels like giving the view too active a role; making it into a half-controller.
  • Making the underlying model object the datasource seems too tightly coupled, and also breaks MVC. And it doesn’t answer the question of who should be the delegate.

I’m tending towards making each of these “FamilyViews” delegate and datasource for their own tables. Action on these tables will have to be coupled to the FamilyView’s delegate (the ViewController), but that shouldn’t be a problem, should it?

Anyone have some input on this?

  • 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-23T08:30:05+00:00Added an answer on May 23, 2026 at 8:30 am

    Views should know how to paint themselves and layout their sub views, depending on their properties, and that’s it.

    You definitely should let a controller class be the delegate instead of the view itself.

    The delegate controller doesn’t have to be the view controller that displays the view, though. It could easily be a completely separate controller class that only knows how to handle what the view requires.

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

Sidebar

Related Questions

I'm writing some fairly complex C# code. I'm finding that my code is throwing
I'm writing an error handling module for a fairly complex system architected into layers.
I'm writing a fairly complex stored procedure to search an image library. I was
I am writing a fairly complex PHP applications where a single user action can
I'm currently writing a fairly complex paint method for a user control, involving a
I am writing a fairly large and complex data analysis program and I have
I have a fairly complex SQL query that pulls different types of products from
So I currently have an application that is fairly complex with large-scale animations and
Writing my first complex XML schema I'm perhaps still thinking to object oriented and
I am writing a fairly simple Django application where users can enter string queries.

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.