/Programming-iOS-4-Book-Examples

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

Primary LanguageObjective-C

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: The book is now being revised for iOS 5 and Xcode 4.2; for the new version of the book, see http://shop.oreilly.com/product/0636920023562.do. Selected chapters from the revision draft text are also available at http://www.apeth.com/iOSBook/. The new versions of the code examples here are in the folder called convertedToIOS5. About the first 750 pages of the book have been revised for iOS 5 so far; this edition will probably run to 1000 pages, so we're about 3/4 done.

Matt Neuburg