Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

kaydelll

macrumors newbie
Original poster
Mar 31, 2009
2
0
Can you help me with XCode? I'm working on some exercises learning to develop Cocoa apps for Mac OS X in Objective-C with the goal of learning Cocoa and Objective-C to develop software for the iPhone and for the iPod Touch.

First, I need to learn the basics of XCode, Cocoa, Objective-C and Interface Builder for Mac OS X.

For my exercises, I will always be using the XCode 2.0 project template for a "Cocoa Application":

The XCode 2.0 project template for Cocoa-Applications in Objective-C


I know how to develop, using Java-Swing in Eclipse and I need to learn how to develop using Objective-C & Cocoa in XCode. This is what I have so far:

This is where I'm stuck at


I understand all of the files in the screen-shot of XCode, and I understand the window and the menu in Interface Builder. I have two questions:

1. I don't know what to do next in Interface Builder.
2. I don't know what to do next in XCode.

I can't use Eclipse or Java or Swing because my goal is to learn XCode and Objective-C and Cocoa for the purpose of learning to develop for the iPhone OS which requires knowledge of XCode and Objective-C and Cocoa.

(I can't develop for iPhone / iPod Touch now because I don't have an Intel Mac yet.)

So, I'm stuck here. Can someone be kind enough to tell me what my next step in XCode and in Interface Builder should be? Also, is there a tutorial that would help me from this point?

Thanks for taking the time to read my question.
 

sbauer

macrumors member
Feb 7, 2009
70
0
Baltimore, MD
You need to create connections from objective-c code to an interface builder object.

You'll basically implement a class in objective-c, and create "action" methods with a return type of IBAction. Methods marked with IBAction are really void methods that tell Interface Builder that they can be used to make a connection. If you established a connection with a button and a method called "createNewUser", the method would be called when the button is clicked.

Guide to Interface Builder - http://developer.apple.com/document...l/IB_UserGuide/Introduction/Introduction.html

If you're in the market for a book, this book goes over the basics pretty well. http://www.amazon.com/Cocoa-Programming-Mac-OS-3rd/dp/0321503619
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.