Take the 2-minute tour ×

Do I learn objective C? Is using Cocoa the easiest and best way to make a UI?

share|improve this question
Please do not make a TODO list application. Pick anything but that. The world does not need another TODO list. Instead we need to actually do the things on the TODO list. –  eat_a_lemon May 2 '11 at 21:58
If you are creating an application for Mac OS X, Objective-C is probably the language you would use. –  kiamlaluno Nov 24 '11 at 20:32
add comment

closed as not constructive by ChrisF Feb 14 '12 at 23:36


3 Answers

up vote 3 down vote accepted

Cocoa is the best way to make a reasonably full featured app with a completely native behaving UI for a current Mac.

A reasonably skilled C++ programmer can pick up the basics of Objective C, syntax and semantic differences, in maybe 2 weeks of part-time study. It just takes a bit of time to get used to how Objective C's form of punctuation abuse is different from C++'s form of punctuation abuse. Learning the vocabulary of the basic set the Cocoa APIs and more in-depth Objective C coding techniques will likely take longer, depending on how much you need for your project(s).

Whether that's easy or not is relative.

share|improve this answer
Thanks for the reply! –  Matt Bettinson Feb 27 '11 at 14:02
add comment

If you want to stick with C++, take a look at Qt, which is a cross-platform C++ application framework. It's used to build the K Desktop Environment (KDE), and is used in commercial cross-platform software, such as Adobe's Photoshop Elements.

share|improve this answer
Is this for mac? I am willing to learn more languages if necessary. –  Matt Bettinson Feb 27 '11 at 4:34
@Matt Bettinson: He's talking about Qt, which is a C++ application framework, not a language. –  Jerry Coffin Feb 27 '11 at 4:42
Oh, ok. I meant more languages as in alternatives though. –  Matt Bettinson Feb 27 '11 at 4:43
Thanks guys. I edited my answer to be a bit more helpful. –  Joe Internet Feb 27 '11 at 23:54
@Matt Bettinson - Most experienced programmers don't want to be forced to learn a new languade to accomplish a task in a language they already know. This is the reason I suggested Qt, but you can use any language that supports the features you need. For GUI apps, other widget kits you can use are wxWidgets, GTK+, and Tk, which are supported by many different languages (Perl, Python, Ruby, C/C++, etc.). Even Qt has bindings to other than C++: qt.nokia.com/products/programming-language-support. –  Joe Internet Feb 28 '11 at 0:02
show 2 more comments

Cocoa is definitely what Apple advises and supports. It's worth noting, however, that while the bits and pieces of code that actually connect to Cocoa have to be written in Objective-C, the rest of it (that does that real work, for example) can all be written in "Objective-C++", which is just normal C++, with the extension changed (to ".mm", IIRC).

While I can't say I've ever taken any kind of a liking to Objective-C, I've written a few Mac apps, and never really had any problem with using it where needed.

share|improve this answer
add comment
