iPhone Camp Birmingham - Intro To Objective C
Upcoming SlideShare
Loading in...5
×
 

iPhone Camp Birmingham - Intro To Objective C

on

  • 1,840 views

Introduction to the basics of Objective-C. Created for iPhone Camp Birmingham by Andria Jensen.

Introduction to the basics of Objective-C. Created for iPhone Camp Birmingham by Andria Jensen.

Statistics

Views

Total Views
1,840
Views on SlideShare
1,840
Embed Views
0

Actions

Likes
0
Downloads
20
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Apple Keynote

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

iPhone Camp Birmingham - Intro To Objective C iPhone Camp Birmingham - Intro To Objective C Presentation Transcript

  • Intro to Objective-C Andria Jensen Co-Owner of Appsolute Genius http://www.appsolutegenius.com andria@appsolutegenius.com @andriajensen @appsolutegenius
  • Basics •superset of the C language •define separate header & source files •use #import to include headers
  • Classes View slide
  • Typing •Strong vs Weak Type •the “id” keyword •object references are *pointers •value types are not pointers View slide
  • Methods
  • Bracket Syntax •bracket syntax == [self doSomething] •dot syntax == self.myProperty •self.myProperty==[self myProperty]
  • Method calls You can also use dot syntax for assignment: This is the same as writing: [myAppObject setTheArray:aNewArray];
  • Implementation
  • Properties You will mostly see properties declared as @property (nonatomic, retain)
  • Properties @property(nonatomic, retain) NSString *text; translates as "I have a member variable of type NSString* named 'text'. I will want a getter/setter pair that uses the retain/release procedure." @property(nonatomic, assign) int value; translates as "I have a member variable of type int named 'value'. I will want a getter/setter pair that doesn't use the retain/release procedure - just assign it." @synthesize text; translates as "Please automatically create the code for the getter and setter for 'text'" @synthesize value; translates as "Please automatically create the code for the getter and setter for 'value'"
  • NSString •uses same placeholders as C •@ in front of literal strings •convenience methods
  • Questions? • Contact me • andria@appsolutegenius.com • @andriajensen • @appsolutegenius • The presentation: