Begginer GUI Tutorial For C

Hello, I have Xcode, and a tutorial for C. I think that I understand the basics of C pretty well, but I have no idea how to use GUI, as the tutorial said nothing about it, and I can only use printf() to see what is happening in my program. Is there any tutorials that you guys know of on how to use GUI?

Are you asking about how to use Xcode, or are you asking about how to write programs that have GUI elements (windows, text fields, buttons, etc.)?

If you're asking about how to write programs that have GUI elements, you'll need to move from C to Objective-C, and you'll need to use the Cocoa APIs.

Objective-C is needed as that's what Apple requires to access Cocoa. Cocoa is required as that's what Apple requires to access their GUI elements (as well as Apple's implementation of arrays, dictionaries, and other elements).

My advice is to find a tutorial on Objective-C and Cocoa. You will NOT be able to use C to create anything Mac-like on the screen. For instance, you will not be able to use C to write a line like "createWindow(x, y, width, height, title)". All of that is done in Objective-C by calling the Cocoa method that creates windows.

For native Macintosh and iOS application development, there is only Objective-C and Cocoa / Cocoa Touch.

It sounds like you have a certain background and would like to use your existing skills to develop for the Mac / iPhone / iPad. Unfortunately that will not be possible. You can use your prior experience and understanding of computers to give you a slight head start on a complete newcomer, but you will need to forget much of what you know about how to do things.

For native Macintosh and iOS application development, there is only Objective-C and Cocoa / Cocoa Touch.

There may be a few posts after this telling you about Java or Ruby or C++ or some other things. Feel free to look into them, but if it were me I wouldn't spend too much time on them.

For native Macintosh and iOS application development, there is only Objective-C and Cocoa / Cocoa Touch.

It sounds like you have a certain background and would like to use your existing skills to develop for the Mac / iPhone / iPad. Unfortunately that will not be possible. You can use your prior experience and understanding of computers to give you a slight head start on a complete newcomer, but you will need to forget much of what you know about how to do things.

For native Macintosh and iOS application development, there is only Objective-C and Cocoa / Cocoa Touch.

There may be a few posts after this telling you about Java or Ruby or C++ or some other things. Feel free to look into them, but if it were me I wouldn't spend too much time on them.

Click to expand...

That's not true at all. You can use Carbon to code any GUI you want, and of course there are a lot of libraries written in C. C++ is also fine, as well as Java.

Well, it's because C is an old language that is designed to be portable. You write your code on a Mac, say, and the same program will run on a DOS PC or a graphing calculator. Programs written to use the console (printf etc) will run on pretty much anything.

When you start writing code for GUIs then you're starting to specialize. Windows GUI programming is different from Mac GUI programming, which is different from programming for X/Motif or Qt (both of which will run on either platform), and you're no longer strictly talking about the C programming language so much as whatever enhancements or libraries are required to support the particular GUI you choose.

MacRumors attracts a broad audience
of both consumers and professionals interested in
the latest technologies and products. We also boast an active community focused on
purchasing decisions and technical aspects of the iPhone, iPod, iPad, and Mac platforms.