Drag our friend the Array Controller onto the Object’s Bar. If you have multiple Entities, you need a separate Array Controller for each one. Change the labels to tell them apart (select a different file and go back to the xib in order for those labels to be visible – it’s a bug in Xcode).

In the Attributes Inspector, tell the controller that we’re using an Entity instead of a Class, then enter the Entity (it’s the one you’ve created in the data model)

While you’re here, tick the “Prepares Content” check box if you want the table view to be populated automatically

Add a Table View to your window and bind it to the Array Controller:

Select the Table View (inside the Scroll View) and head over to the Bindings Inspector

Under Table Content, select Bind To your Array Controller

Now select the actual Table Column you want to fill with data, and still inside the Bindings Inspector under Value, bind the column to your Array Controller

In the field for Model Key Path, type the attribute/property you’d like to see in this column (you’ve defined this in the data model)

Repeat the process for each column you want to fill with data

To add data to your table:

Add a couple of Gradient Buttons to your window

Make one the “Add” and one the “Delete” button

Hook up each button to the Array Controller via control drag, selecting add and remove respectively

Congratulations: You’ve just created an editable Table View, hooked up to Core Data without a single line of code!

Let’s create a functional SAVE menu item

If you quit the app (rather than running it again from Xcode), all your data will save. However we can implement a manual save action with ease. The menu item itself is there by default, all we need to do is hook it up to the App Delegate and bind it to the save function.

In the Object Sidebar, select Main Menu, then select File – Save (which will expand the item in the sidebar too). From the save menu option, control drag to the App Delegate and select saveAction.