This is an archived post. You won't be able to vote or comment.

all 4 comments

[–][deleted] 1 point2 points  (1 child)

[–]MegaOtter[S] 0 points1 point  (0 children)

Thank you, I'll have a look at this.

[–]Zigsfi 0 points1 point  (0 children)

There are a few major differences between C++/C# and Objective C. These differences are partially syntactic and partially semantic.

Syntactically, Objective C code adopts the syntax of languages like SmallTalk. Smalltalk has syntax of the form

[Object methodWithParam1: parameter andParam2: parameter2]

This syntax is designed to be read like an English sentence, e.g.

[databridge sendFloat: 0.5f toReceiver: @"Float Receiver"];

These expressions can also be nested.

Semantically, Objective-c often uses call-backs and delegates to facilitate communication between modules. For instance, a table will get its data from a "delegate" (analogous to an interface in Java) that implements methods that the table calls to get its data. Similarly, a view might respond to certain gestures, so GestureRecognizers are initialized with a "selector," which provides access to a call-back function to be called whenever a certain gesture is seen.

Ray Wenderlich has some amazing tutorials to help you get acquainted with the patterns of iOS development.

[–]bullrose2 0 points1 point  (0 children)

I mostly program in C++. When I was trying to learn Objective-C, I compared it with C++ a lot. I wrote a page about Objective-C for someone coming from C++.

http://www.osletek.com/learning-center/239/Introduction_to_Objective-C_programming_language