Objective-C Programming_ The Big Nerd Ranch Guide - Aaron Hillegass [96]
-- Glenn Zelniker
CEO
Z-Systems Audio Engineering
www.z-sys.com
“We turned to Big Nerd Ranch to develop the Teavana concept into an iPhone app. More than just a developer, they partnered with us to make the app better than we could have imagined alone. The final app was bug-free and functioned exactly as expected. I would definitely recommend Big Nerd Ranch and can't speak highly enough about their work.”
-- Jay Allen
VP of Ecommerce
Teavana Corporation
www.teavana.com
Software: Finely-crafted Applications
Big Nerd Ranch is a leading developer of downloadable mobile and desktop Mac applications. Several of our most intriguing iPhone and desktop apps are available for purchase in the iTunes store.
Mobile Applications
Smartphones have started to take over the mobile phone market. Since the inception of the iPhone, we have created dozens of apps for our clients and now have a roster of our own applications including games, utilities, music and educational apps. As an ever-evolving frontier of technology, Big Nerd Ranch is committed to staying ahead of the curve.
Mobile Apps
The world has gone mobile. If your company doesn't have a mobile application, you are behind the curve. As of early 2011, the iTunes app store has grown to nearly 400,000 apps and the Android market has climbed to more than 250,000 applications. Google has unveiled its Android platform with an app store of its own and dozens of smartphone manufacturers have announced Android-powered devices. RIM has launched App World, Palm has its Palm Store, Nokia launched Ovi (its online store) and Microsoft has unveiled Windows Marketplace.
While still leading the way, the iOS market has put up some staggering statistics:
Total iOS app store downloads: 10.3 billion
iPhone apps are being downloaded at a rate of 30 million per day.
As of early 2011, when the app store hit 10 billion downloads, it did so in half the time (31 months versus 67 months) that it took for songs in the iTunes store to hit the same mark.
The average number of apps downloaded for iPhone/iPad/iPod touch is currently at more than 60.
Books: The Big Nerd Ranch Guide Series
At Big Nerd Ranch, our philosophy and our passion for education extends to our books. Visit www.bignerdranch.com/books for Big Nerd Ranch books currently available.
Contact the Big Nerd Ranch
Visit us online at www.bignerdranch.com/.
For a Big Nerd Ranch on-site training proposal, please contact us at 404.478.9005.
Table of Contents
I. Getting Started
1. You and This Book
C and Objective-C
How this book works
How the life of a programmer works
2. Your First Program
Installing Apple’s developer tools
Getting started with Xcode
Where do I start writing code?
How do I run my program?
So what is a program?
Don’t stop
II. How Programming Works
3. Variables and Types
Types
A program with variables
Challenge
4. if/else
Boolean variables
else if
For the More Curious: Conditional (ternary) operator
Challenge
5. Functions
When should I use a function?
How do I write and use a function?
How functions work together
Local variables, frames, and the stack
Recursion
Looking at the frames in the debugger
return
Global and static variables
Challenge
6. Numbers
printf()
Integers
Tokens for displaying integers
Integer operations
Floating-point numbers
Tokens for displaying floating-point numbers
Functions for floating-point numbers
Challenge
7. Loops
The