Skip to content

nikhildhamsaniya/Programming-iOS-4-Book-Examples

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is the downloadable code for my book, "Programming iOS 4: Fundamentals of iPhone, iPad, and iPod touch Development," published by O'Reilly in May 2011.

For more information about the book:

http://oreilly.com/catalog/9781449397296/

Please see also my Web site:

http://www.tidbits.com/matt

The idea is that if you have the paper edition of the book, you shouldn't have to enter code examples by hand to try them out. And if you have an electronic edition of the book, copying and pasting the code and creating the surrounding Xcode project could be tricky.

The downloadable code examples here are all couched as Xcode projects. So all you have to do is open a project in Xcode and read it, build it, run it. I've tried to comment the code in such a way as to show you where to concentrate your attention.

In some projects, multiple examples are combined; usually in this case you are instructed to changed a #define from 1 to 2 and so forth and then run the project again.

Readers are encouraged to use this code as a starting place. Try tweaking things to see what difference it makes.

You may use this code in your own projects. What you may not do is pass off my examples as your own. If you cite code or anything else from the book, give proper credit.

If you find any issues with this code, please let me know or supply a patch.

NOTE ON PAGINATION: I realize that the page numbers in the folder names are not useful for those with the Kindle or ePUB editions, but they do keep the examples sorted in order, and they correspond to the pagination of the printed and PDF. — In September 2011 we released a Second Printing with improved screen shot sizes and incorporating corrections for all errata; this caused the printed and PDF versions to repaginate. Therefore, most folder names will now start with *two* page numbers, the first printing followed by the second printing.

NOTE ON SCREENSHOTS: The screenshots for the first printing are often too small to see comfortably. I tried but failed to prevent this (it is at last corrected in the second printing). To help with this issue, the full-resolution original screenshots are included here as well.

NOTE ON iOS 5: I thought it might be instructional for readers, even without the book yet having been revised for iOS 5 and Xcode 4.2, at least to have new versions of the example code. So I've started converting them. The new versions are being put in the folder called convertedToIOS5. There are some interesting differences wrought by LLVM 3.0 and ARC (not to mention the new project templates). Also I'm trying to illustrate new iOS 5 features, in approximately the places where I'd be disussing them in a new edition. Selected chapters from the revision draft text, discussing iOS 5, will be available at http://www.apeth.com/iOSBook/ (mixed in with the selected chapters from the iOS 4 edition). Currently these include chapters 1, 3, 5, 6, 7, 9, 12, 15, and 17. You might need to force a browser refresh to see the new versions of these chapters.

Matt Neuburg

About

Downloadable code examples for my book, "Programming iOS 4".

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published