Objective-C Fundamentals for iPhone Development: Variables, OOP, and Methods
This boot camp prep guide focuses on essential Objective-C concepts for iPhone development, including the importance of variable declaration, data types such as BOOL, int, float, and arrays. It covers the fundamentals of object-oriented programming (OOP) like classes, instances, methods, and constructors. The guide emphasizes naming conventions, the significance of case sensitivity, and how to manage memory. With practical examples of control structures like if-else, for loops, and while loops, developers will gain foundational knowledge crucial for building iOS applications.
Objective-C Fundamentals for iPhone Development: Variables, OOP, and Methods
E N D
Presentation Transcript
OOP Boot Camp Prep for Xcode and iPhone Development
Variables • Information storage • Should be well named • Case sensitive • “Camel Case”
Variables • Datatypes • BOOL • int • float / double • char • http://www.techotopia.com/index.php/Objective-C_2.0_Data_Types
Variables • Datatypes • Array • Dictionary • String • Enum • Struct • Id • Pointer
Control • If / Then / Else • For Loop • While Loop
OOP • Object – *IS* a thing
OOP • Class – Describes a thing • Holds information • Knows how to do things
OOP • Instance – is a specific thing that has the properties of our Class
Methods • How your object DOES WORK • Should be well named • Parameters • Return value
Methods • - Instance Methods • You need to have an instantiated instance to call this method • (This is used most of the time) • + Class Methods • No instance required • Constructor
Memory • If you allocate it, you need to release it
Symbols • Math: + - * / % • Relation: > < >= <= != == • Assignment: = • Logic: && || !
Files • Interface • Implementation
More help • iTunes U • Stanford iPhone Application Development • First 3 lessons
Connection • Google • Blogs • Twitter • Meetups • Relationships