Objective-C and iPhone Bootcamp
Revision: TE7301_20110213
- Course Length:
- 5 Days
- Course Description:
- Understanding the Objective-C programming language is critical to becoming a successful iPhone developer. This class is designed to teach you a solid foundation in Objective-C 2.0 from the ground up. This course does not require or assume any background in Objective-C, C, C++ or Object Oriented Programming (OOP) in general. You will learn how to enter, develop, and debug your programs under Mac OS X using the Xcode development tool. In the second part of the course, students will learn how to write iPhone / iPad Applications with the SDK!
- Who Should Attend:
- This course is for programmers who want to write applications for Mac OS X, the iPhone, the iPod Touch, or the iPad. Some prior programming experience, preferably with an object-oriented programming language.
- Benefits of Attendance:
-
Upon completion of this course, students will be able to:
- Define new classes and write programs in Objective-C
- Compile, edit, and run Objective-C programs under Mac OS X
- Write subclasses, categories, and understand the principles of inheritance
- Understand how dynamic typing works and the principle of polymorphism
- Use the Foundation Framework classes to work with numbers, strings, collections, and files
- Archive and copy objects and to thoroughly understand the principles of memory management
- Get started writing applications for the iPhone, iPod Touch, and iPad
- Write iPhone and iPad applications
- Use XCode to manage the application development project, and to compile, edit, and debug your applications
- Run your application on a device
- Use Interface Builder to design a user interface
- Integrate iPhone interface elements like buttons, switches, and sliders into your application
- Work with views and view controllers
- Work with navigation controllers, tables, and pickers
- Integrate multimedia into your applications to create sound effects, and to play audio and video clips
- Respond to touch controls and gestures
- Manipulate images
- Perform simple animation
- Save and restore your application’s data
- Prerequisites:
- Students should have some prior programming experience, preferably with an object-oriented programming language.
- Course Outline:
-
- Getting Started in Objective-C
- What is Objective-C?
- Your First Program
- Steps for Using Xcode
- What is a Class, Object, or Method?
- Defining a Class to Work with Fractions
- Accessing Instance Variables
- Data Types and Expressions
- Basic Data Types
- Arithmetic Expressions
- Defining a Calculator Class
- Loops and Making Decisions
- The for statement
- The while statement
- The do statement
- The if Statement
- The switch Statement
- The Conditional Operator and Boolean Variables
- More On Classes
- Properties, Synthesized Accessor Methods, and the dot Operator
- Multiple Method Arguments
- Passing Objects as Arguments
- Local Variables; The self Keyword
- Allocating and Returning Objects in Methods
- Inheritance, Categories, and Protocols
- Inheriting Methods and Instance Variables
- Subclasses: Extension through Inheritance
- Classes Owning Their Own Objects; Overriding Methods
- Categories
- Protocols
- Polymorphism, Dynamic Typing and Dynamic Binding
- Polymorphism; Static Typing
- Dynamic Typing and Dynamic Binding
- The Preprocesor and Underlying C Language Features
- Preprocessor
- Arrays
- Functions
- Structures
- Pointer
- Unions
- Miscellaneous Language Features
- Numbers and Strings
- Number Objects
- String Objects
- Collections
- Array Objects
- Fast Enumeration
- Sorting Arrays
- Dictionary Objects
- Set Objects
- Working with Files
- Managing Files and Directories: NSFileManager
- Working with Paths: NSPathUtilities.h
- Memory Management
- The Autorelease Pool
- Reference Counting
- Summary of Memory Management Rules
- Garbage Collection
- Copying Objects
- The copy and mutablecopy Methods
- Shallow Versus Deep Copying
- Implementing the NSCopying Protocol
- Copying Objects in Setter and Getter Methods
- Archiving Objects
- Archiving with XML Property Lists
- Archiving with NSKeyedArchiver
- Writing Encoding and Decoding Methods
- Using NSData to Create Custom Archives
- Using the Archiver to Copy Objects
- Writing Your First iPhone Application
- Introductin to Cocoa Touch
- The iPhone SDK
- Your First iPhone Application
- Web-based vs. Native Applications
- The Difference Between the Two
- Cocoa, Cocoa Touch an the iPhone SDK
- Definitions
- iPhone OS Frameworks
- What is a Framework?
- Overview of iPhone SDK Frameworks
- iPhone Application Development Overview
- Overview of the Tools and Process
- Some Quick Reviews
- Objective-C
- Protocols
- Memory Management
- Writing Your First iPhone Application
- Outlets and Actions
- Introduction to Interface Builder
- Using the iPhone Simulator
- Extending your Application: Adding an Application Icon
- Simple Debugging Techniques
- Using the Preprocessor
- NSLog and the Description Method
- Using Breakpoints
- Running Your App on a Device
- The iPhone Provisioning Portal
- Developer Certificates, App IDs, Device IDs, Provisioning Profiles
- XCode’s Organizer Window
- Application Execution and MVC
- Applications and Events
- The Model-View-Controller Design Pattern
- Project Lab: Calculator
- Create a Working Calculator App
- Screen Geometry
- The iPhone and iPad Coordinate System
- The frame, bounds, center, and origin
- Supporting Structures and Functions
- Applications and Events
- Understanding Views and View Controllers
- Properties of Views
- Subviews and Superviews
- Creating a View Controller
- Multiple View Controllers
- Creating Views Programmatically
- Understanding a View-Based Application
- Manipulating Views: Moving and Hiding
- UIImageView – Working with Images
- Adding Simple Animation
- Handling Device Rotation and Control Resizing and Repositioning
- Project Lab: State Capitals
- Understanding Delegates
- Using the UIPickerView class
- Reading Data from the Internet
- Project Lab: The Birds
- Creating a Navigation-based Application
- Working with a Table View Controller
- Populating Data in a Table
- Handling Row Selection
- Working with UITextView’s
- Playing Audio and Video Files
- Saving an Image to the Photo Album
- Displaying Alerts
- Creating a Default.png screen
- Project Lab: The Gear
- Transforming Images
- Using Timers
- Simple Animation
- Saving and Restoring the Application State
- Handling Touch Events
- Responding to Shake Gestures
- Working with Sliders and Switches
- Adding Sound Effects
- Programming for the iPad
- Application Design Decision: Universal vs. Separate Apps
- Examples
- And More….
- Additional Topics, Time Permitting
- Getting Started in Objective-C













