Besides converting the UIImage to NSData and back there is nothing special by having a to-many relationship with UIImage s. So any core data tutorial that includes a to-many relationship should suffice. If you need sample code you can check out Apple’s iPhoneCoreDataRecipes.

A few pointers to help you get started. Let’s pretend we have a PersonViewController that inherits from a `UITableViewController’ that gets called with something like:

PersonViewController has the following properties:

There is add button which would shod the image picker

Then in the callback imagePickerController:didFinishPickingMediaWithInfo: we can:

The implementation of images just to keep it simple

The table view data source methods would just be:

and however the cell is created doesn’t really matter. At then if we wanted to do something with the images we can do something in tableView:didSelectRowAtIndexPath:

Leave a Reply

电子邮件地址不会被公开。 必填项已用*标注