Need Help With Cocoa-Objective-C Template

Discussion in 'Mac Programming' started by kaydelll, Mar 31, 2009.

  1. kaydelll macrumors newbie

    Mar 31, 2009
    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.
  2. sbauer macrumors member

    Feb 7, 2009
    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 -

    If you're in the market for a book, this book goes over the basics pretty well.
  3. kaydelll thread starter macrumors newbie

    Mar 31, 2009
    Thank You!

    Thank you! I'll study these links and the book.

Share This Page