Objective-C for Absolute Beginners

iPhone, iPad and Mac Programming Made Easy

By Gary Bennett , Mitchell Fisher , Brad Lees

Objective-C for Absolute Beginners will teach you how to program a computer—in this case, your Mac, iPhone or iPad—using Objective-C, an elegant and powerful language with a rich set of developer tools.

Full Description

  • ISBN13: 978-1-4302-2832-5
  • 292 Pages
  • User Level: Beginner
  • Publication Date: August 24, 2010
  • Available eBook Formats: EPUB, MOBI, PDF
  • Print Book Price: $39.99
  • eBook Price: $27.99
Buy eBook Buy Print Book Add to Wishlist

Related Titles

Full Description

It seems as if everyone is writing applications for Apple’s iPhone and iPad, but how do they all do it? It’s best to learn Objective-C, the native language of both the iOS and Mac OS X, but where to begin? Right here, even if you’ve never programmed before!

Objective-C for Absolute Beginners will teach you how to write software for your Mac, iPhone, or iPad using Objective-C, an elegant and powerful language with a rich set of developer tools. Using a hands-on approach, you’ll learn to think in programming terms, how to use Objective-C to build program logic, and how to write your own applications and apps.

With over 50 collective years in software development and based on an approach pioneered at Carnegie Mellon University, the authors have developed a remarkably effective approach to learning Objective-C. Since the introduction of Apple’s iPhone, the authors have taught hundreds of absolute beginners how to develop Mac, iPhone,and iPad apps, including many that became popular apps in the iTunes App Store.

What you’ll learn

  • The fundamentals of computer programming: how to understand variables,design data structures, and work with file systems
  • The logic of object-oriented programming: how to use Classes, Objects, and Methods
  • The flexibility of Apple's developer tools: how to install Xcode and write programs in Objective-C
  • The power of Cocoa and Cocoa touch: how to make Mac OS X applications or iOS apps that do cool stuff

Who this book is for

Everyone! This book is for anyone who wants to learn to develop applications for the Mac or apps for the iPhone and iPad using the Objective-C programming language. No previous programming experience is necessary.

Table of Contents

Table of Contents

  1. Becoming a Great iPhone/iPad or Mac Programmer
  2. Programming Basics
  3. It’s All About the Data
  4. Making Decisions About...and Planning Program Flow
  5. Object Oriented Programming with Objective-C
  6. Introducing Objective-C and Xcode
  7. Objective-C Classes, Objects, and Methods
  8. Programming Basics in Objective-C
  9. Comparing Data
  10. Creating User Interfaces with Interface Builder
  11. Memory, Addresses, and Pointers
  12. Debugging Programs with Xcode
  13. Storing Information
  14. Protocols and Delegates
Source Code/Downloads

Downloads are available to accompany this book.

Your operating system can likely extract zipped downloads automatically, but you may require software such as WinZip for PC, or StuffIt on a Mac.

Errata

Please Login to submit errata.

On page 41:
Original : For example, the hexadecimal number 2AF3 is equal, in decimal to (2 x 16³) + (10 x 162) + (15 x 161) + (3 x 160)

In the last three expressions of the calculus, the numbers should be multiplicated by powers of 16.

Correct :
decimal to (2 x 16³) + (10 x 16²) + (15 x 16¹) + (3 x 16⁰)

On page 99:

On page 99 it says "The third line:
if (printf(“Hello World”) != -1)"

but the third line is "if (printf(“Hello World”) == 0)"

On page 142 & 143:
Error in Setter Method -

current reads - >

- (void)setTitle(NSString* newString);

Should be ->

- (void) setTitle: (NSString*)newString;

On page 167:

In code review and full code example

line
NSDate *saleDate = [NSDate dateWithString:@"2010-0 9–04 04:00:00 -0700"];
date format is (YYYY-MM-DD) you made a mistake when you put "-0" at end on the year

It should read:
NSDate *saleDate = [NSDate dateWithString:@"2010-9–04 04:00:00 -0700"];

On page 171:

line:
NSMutableArray *bookList = [NSArray arrayWithObjects:@"Moby Dick", @"Frankenstein",
@"Tom Sawyer”, nil];

should be:
NSMutableArray *bookList = [NSMutableArray arrayWithObjects:@"Moby Dick", @"Frankenstein",
@"Tom Sawyer”, nil];

On page 172:

an NSMutableDictionary
code example:
NSMutableDictionary *book;
book = [NSDictionary...

should be:
NSMutableDictionary *book;
book = [NSMutableDictionary...

On page 186:

Listing 8–4. Creating an NSArray from an existing NSSet.
1 NSSet *mySet = [NSSet setWithObjects:@"One", @"Two", @"Three", nil];
2 NSArray *myArray = [NSSet allObjects];
3
4 NSLog(@"%@", [myArray objectAtIndex:1);

Line 2 should be
NSArray *myArray = [mySet allObjects];

On page 204:

On page 204, the author specifically requests that the user modify the "main.c" file which does not exist within the project... It goes on throughout the Chapter referencing this file, but the file simply isn't there.