Objective C - Naming Outlets and Actions via a Database

154 Views Asked by At

I am new to programming so any and all help is appreciated. Is it possible name outlets and actions as well as any text for labels associated with those outlets and actions via a database. I am trying to create a question template that may change on the gender and age of the person. So what I am thinking is to create one set of code that loops until it is told to stop instead of rewriting the code over and over for all of the different templates needed. If this is possible, are there any pitfalls that I should be wary of or any additional words of wisdom. Thank you in your advance for your help. Cheers!

1

There are 1 best solutions below

2
On BEST ANSWER

What you are going to want to do is use the database just to fill in the fields and titles of things. These are just strings. The actual outlets and actions can be generic, and made many times with the same names.

What you would do is perhaps create a view in interface builder of a generic question template, and have the view controller load this NIB as needed to add a new question and place it, as well as load it with new data from the db.