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 608751
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T17:29:36+00:00 2026-05-13T17:29:36+00:00

I’m taking the plunge into iPhone development after about two years working with django.

  • 0

I’m taking the plunge into iPhone development after about two years working with django. As I’ve done tutorials and read documentation, one of the things that strikes me as inconvenient about the various libraries used in iPhone development is the amount of repetition required when creating user input forms for data models.

I know of two conventional approaches to user input form creation:

  1. Create a group of UITextFields in Interface Builder that correspond with the properties on the model class and link them up to corresponding IBOutlets on a custom form controller.

  2. Create a form view programatically with UITextFields in tables with a custom form view controller class. The class keeps a list of names that correspond to the properties of a model in an array, and then iterate over the array to create UITextFields for each table cell. Use special casing to determine which model attribute is being iterated over, and use that information to create table cells with corresponding UILabels and UITextFields.*

Of the two, only the first seems practical for iterative development, the second is painfully verbose and extremely difficult (for me) to read. With the introspective capabilities of Objective-C it seems like it would be possible to write code that accepted a model class as an argument and generate a form controller (and perhaps even a form view) from that information at runtime.

So I have three questions:

  1. Are there conventional alternate approaches to creating form views and controllers for models other than the two I’ve listed above? I’m not loving either approach I’ve listed there.

  2. Is automatic generation of form controllers / views at runtime feasible in Objective-C, or am I just barking up the wrong tree?

  3. Has such automatic generation been attempted or accomplished already? (a little googling turned up nothing)

*My main reference for this comes from Example #6 in Chapter 9: Navigation Controllers and Table Views of Apress’ “Beginning iPhone 3 Development“

  • 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-13T17:29:36+00:00Added an answer on May 13, 2026 at 5:29 pm

    I’m working on the same problem now, in my case I have a complex set of models that are coming from WSDL, and there’s a LOT of form elements that can change from time to time. I definitely do not want to be doing the forms by hand in code or in IB.

    Objective-C is a fully dynamic language and you can definitely do what you want to do in a fully dynamic fashion. Assuming that your models are Core Data models, you can find all of the properties using something like [[myCoreDataObject entity] propertiesByName]. You can then iterate through these properties automatically creating the appropriate form fields depending on their types.

    You would then create a subclass of for example UITableViewController which you pass an NSManagedObject to, and it will automatically create a form which matches the model object.

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
this is what i have right now Drawing an RSS feed into the php,
I am reading a book about Javascript and jQuery and using one of the
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I don't have much knowledge about the IPv6 protocol, so sorry if the question
I am currently running into a problem where an element is coming back from
I'm working with an upstream system that sometimes sends me text destined for HTML/XML

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.