Objective C Primer (with ref to C#)

1,387 views

Published on

Take another look at Objective Primer with reference to C#

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,387
On SlideShare
0
From Embeds
0
Number of Embeds
299
Actions
Shares
0
Downloads
5
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Objective C Primer (with ref to C#)

  1. 1. C# => Objective C primer Nov 2011
  2. 2. Demonstrate example for usingheader file: method definition
  3. 3. Object type Demonstrate example for using adhoc object
  4. 4. Method & MessagingC#void InsertObject(object anObject, int index)
  5. 5. Method & MessagingObjective-C vs C#+ static (class method)- (normal public instance method)
  6. 6. Calling a methodC#myArray.InsertObject(anObject, 0);
  7. 7. Nested messagesTo avoid declaring numerous local variables to store temporaryresults, Objective-C lets you nest messages. C# C# myAppObject.theArray() myAppObject.objectToInsert() return A return B [A insertObject:B atIndex:0] object method parameter parameter
  8. 8. Use accessor methods (Properties) using dot
  9. 9. PropertiesDeclare – in .h fileDefine – in .m file
  10. 10. Pointer: *
  11. 11. NSxxx, CGxxxxNextStep CoreGraphics
  12. 12. cocos2D objects and methods
  13. 13. Actions

×