开发者

iPhone: Grouping records in multiple UITableView views

Let me first say, I know how to create sections and group records within a UITableView.

What I am wanting to do is something similar to creating a photo album. So, I have all my data objects coming from core data, and, I wan开发者_运维百科t to be able to create a custom group, such as "My Trip to Mexico" and "First Birthday". Then, the user should be able to add objects/records into new sections/albums. So, basically the user is creating custom sections with their own custom names, and then choosing what records should go into that section/album.

So, I am just wondering what is the best way to do this? I am thinking that I would just create some extra attributes for my core data model. Or, would I create a whole new "Album Section" object, and somehow use that?

Point me in the right direction. :)


I Would not recommend defining the album as an attribute within the image object, as the image could then only be part of a single album

datamodel http://www.freeimagehosting.net/uploads/d961b23681.png

I would recommend the datamodel above. With this datamodel you could add images to multiple albums. I assume groups albums and sections within your description are the same.

If not you should create an additional entity and relation for different "meanings" for example: an image always has to be Part of one single Event, but can be added to multiple custom groups (like in iPhoto)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜