iPhone Core Data :: basic design for view preference objects of underlying data

I am using Core Data, and have created the following objects in my xcdatamodel:

(1) ContactEntity - attributes: firstname, lastname, relationship to MyEmailsEntity and MyNumbersEntity objects

(2) MyEmailsEntity - attributes: emailaddress

(3) MyNumbersEntity - attributes: phonenumber

The above is so that I can define contact objects, and a contact can have many email addresses defined (MyEmailsEntitys) and phone numbers (MyNumbersEntitys) all linked to it.

The user enters this data once, but may now want to setup different 'views' of the underlying data, so for example in one 'view' only see one of the email addresses and phone numbers, and in another 'view' see all the data etc. All should be persisted via Core Data so these 'views' can be reused.

I'm thinking this can be done via a 'ContactEntityView' object, in which they define which email addresses / numbers are to be displayed for that ContactEntityView. Each email address / phone number has a boolean associated with it, set to on/off, and the user sets all of the above using IUTableViews. However I'm not sure how this would be done.

Whats the best way the new 'ContactEntityView' objects should be modelled ontop of the existing 3 objects?

Any advice appretiated.. thanks!

Answers


Need Your Help


About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.