How to automatically generate Core Data GUI in Xcode 4?

I go through Learn Cocoa on a Mac that was written based on Xcode 3, and I use v4. So far I have been able to quite easily find a way to overcome the differences, but now I am in the chapter introducing Core Data, and there is a part about the possibility of automatically creating a GUI using Option + drag and drop from an object to a window in IB, but I seem to I can’t do it in Xcode 4. Is it possible, or was this ability able with v3? And more importantly, how do I do this?

These are the instructions in the book:

Start by navigating to the Xcodes navigation bar. Go to the Resources group and double-click MainMenu.xib to open it in Interface Builder. This leads to the creation of a nib file similar to the one you saw earlier, including a menu and a blank window. Take a blank window to the foreground (double-click its icon in the main window if the window does not appear), and make it a little larger; somewhere around 500 x 600 will be fine.

Now go back to Xcode and pick up the model file if it is not already displayed. What you are about to do is drag the MythicalPerson object from the chart workspace to a blank window in Interface Builder. Start by holding βŒ₯, then click and hold the field representing the MythicalPerson object. Keep holding the mouse and dragging, and you will see a translucent copy of the entity that is dragged along with the mouse pointer. After you start dragging and dropping, you can release the button. Now drag the object over a blank window in Interface Builder. If you do not see this, use ⌘Tab to return to the Builder interface (while holding the mouse button!), Drag the middle of an empty window and release the mouse button.

Now you will be presented with the interface assistant for the new data core

Any clues? Thanks!

+6
source share
2 answers

If someone is struggling with Chapter 7 due to the removal of the Base Data Interface Assistant from Xcode 4, then follow the guide here to get you back to track: http://www.swampfoetus.net/chapter-7-fail/

+6
source

I had this problem a while ago when I tried to follow the Xcode 3 master data guide in Xcode 4. After requesting here and dragging objects in different ways It would seem that the only conclusion we could make was that Apple deleted Core Data Entity Interface helper in Xcode 4. There are two possible solutions, you have an alternative installation of Xcode 3 on your computer and use this to generate a graphical interface and then do the rest of the work in Xcode 4 (which is not particularly practical) or with create a GUI manually and use the bindings to configure it. Apple provides an excellent tutorial on this here if you do not know how to do it.

+3
source

Source: https://habr.com/ru/post/892877/


All Articles