Related Titles
- Full Description
-
The team that brought you the bestselling Beginning iPhone 4 Development is back again for Beginning iOS 5 Development, bringing this definitive guide up-to-date with Apple's latest and greatest iOS SDK, as well as with the latest version of Xcode.
There's coverage of brand new technologies, with chapters on storyboards and iCloud, for example, as well as significant updates to existing chapters to bring them in line with all the changes that came with the iOS 5 SDK. You'll have everything you need to create your very own apps for the latest iOS devices, including the iPhone 4S, iPad 2, and the latest iPod touch. Every single sample program in the book has been rebuilt from scratch using Xcode 4.2 and the latest iOS 5-specific project templates and designed to take advantage of the latest Xcode features.
Assuming only a minimal working knowledge of Objective-C, and written in a friendly, easy-to-follow style, Beginning iOS 5 Development offers a complete soup-to-nuts course in iPhone, iPad, and iPod touch programming. The book starts with the basics, walking through the process of downloading and installing Xcode and the iOS 5 SDK, and then guides you though the creation of your first simple application.
From there, youll learn how to integrate all the interface elements Apple touch users have come to know and love, such as buttons, switches, pickers, toolbars, and sliders. Youll master a variety of design patterns, from the simplest single view to complex hierarchical drill-downs. The confusing art of table building will be demystified, and youll learn how to save your data using the iPhone file system. Youll also learn how to save and retrieve your data using a variety of persistence techniques, including Core Data and SQLite. And theres much more! Youll learn to draw using Quartz 2D and OpenGL ES, add multitouch gestural support (pinches and swipes) to your applications, and work with the camera, photo library, accelerometer, and built-in GPS. Youll discover the fine points of application preferences and learn how to localize your apps for multiple languages.- The iOS 5 update to the bestselling and most recommended book for Cocoa touch developers
- Packed full of tricks, techniques, and enthusiasm for the new SDK from a developer perspective
- Written in an accessible, easy-to-follow style
What youll learn
- Everything you need to know to develop your own bestselling iPhone and iPad apps
- Best practices for optimizing your code and delivering great user experiences
- How to create universal apps for both the iPhone and iPad
- What is data persistence and why is it important
- Get started with building cool, crisp User Interfaces
- What and how to use Table Views
- How to do graphics with Quartz and OpenGL ES
- What geo app development features the new iOS 5 brings to the iPhone 4S
- How to get your app in iCloud
- And much much more...
Who this book is for
Everyone who wants to start developing for iPhone, iPod touch, and iPad!
For the latest sourcecode, please head to www.iphonedevbook.com.
- Table of Contents
-
Table of Contents
- Welcome to the Jungle
- Appeasing the Tiki Gods
- Handling Basic Interaction
- More User Interface Fun
- Autorotation and Autosizing
- Multiview Applications
- Tab Bars and Pickers
- Introduction to Table Views
- Navigation Controllers and Table Views
- iPad Considerations
- Application Settings and User Defaults
- Basic Data Persistence
- Get Your App in the iCloud
- Grand Central Dispatch, Background Processing, and You
- Drawing with Quartz and OpenGL
- Taps, Touches, and Gestures
- Where Am I? Finding Your Way with Core Location
- Whee! Gyro and Accelerometer!
- iPhone Camera and Photo Library
- Application Localization
- Where to Next?
- Source Code/Downloads
- Errata
-
If you think that you've found an error in this book, please let us know about it. You will find any confirmed erratum below, so you can check if your concern has already been addressed.
On page chapter 7, page 13:When I exec this:
"Open the identity inspector, and then select File’s Owner in the dock. The identity inspector will show NSObject in the Custom Class’s Class field. We need to change NSObject to BIDAppDelegate, marking the app delegate as the File’s Owner, which will allow us to connect the rootController outlet to the new controller. Go ahead and type BIDAppDelegate or select it from the popup."
the following warning is displayed:
Defines Presentation Context is not available prior to Xcode 4.2.
On page 46:Some of the keyboard shortcuts seem to confuse the option and the shift key. New Project is Shift-Cmd-N and Open Quickly is Shift-Cmd-O.
On page 50:@property (nonatomic, retain)... is pre-ARC. It should be replaced by @property (strong, nonatomic)...
On page 72:
Regarding passive controls, it says: "text fields and image controls are often used in this manner."
Shouldn't that be "labels" and not text fields. I'm pretty sure text fields are specifically used FOR user interaction, not passive controls.
On page 77:
2nd last sentence on the page. Editor > Size to Fit Content should read Edit > Size to Fit Content.
On page 78:
Line #5: The alignment menu should be:
Editor -> Align -> Horizontal Center in Container
On page 93:
backgroundTap method does not hide the keyboard as expected.
to achieve the desired outcome, the code:
[nameField resignFirstResonder];
[numberField resignFirstResonder];
should be replaced with:
[self.view endEditing:YES];
On page 133:
Chapter 6:
Perhaps due to recent XCode changes, you must override loadView in each BID*ViewController.m, or at least call [super loadView] from within the loadView method in each of the hand-rolled controllers.
- (void)loadView
{
// If you create your views manually, you MUST override this method and use it to create your views.
// If you use Interface Builder to create your views, then you must NOT override this method.
[super loadView]; // <==== ADD THIS
}
On page 144:
Chapter 6, Figure 6-10.
My version of Xcode 4.3 (4E109) does not provide UIViewController subclass as a template to choose from. I manually copied the relevant files from the sample code provided from the website to create the ViewController subclass.
On page 155:
The code after "We then check to see whether yellowViewController is nil" is wrong.
It should be:
if (self.yellowViewController == nil) {
On page 240:
@implementation ViewController
changed to:
@implementation BIDViewController
All Error messages resolved.
On page 275:
The following code:
cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero
reuseIdentifier: sectionsTableIdentifier] autorelease];
Information for iOS 5 Documentation:
initWithFrame:reuseIdentifier:
Initializes and returns a table cell object. (Deprecated in iOS 3.0. Use initWithStyle:reuseIdentifier: instead.)
On page 277:
Here is a your code:
[self.keys removeObjectsInArray:sectionsToRemove]; [sectionsToRemove release];
[table reloadData];
when we use the ARC "release" method, the following line is not needed:
[sectionsToRemove release];
On page 299:"Error" (only cosmetic but is fixed in all other views in the app) in source code - the row is not deselected in the disclosure button table view. Insert
[tableView deselectRowAtIndexPath:indexPath animated:YES];
below [alert show];
On page 349:
Under "But There's One More Thing" is the line "We can do this by deleting a single line of code from BIDPresidentDetailController.m. In the tableView:cellForRowAtIndexPath: method, delete the following line of code:"
After this line is the original set of code for this method, with no changes. There is no indication of what line needs to be deleted.
On page 558:
The line "if (indexNumber = [[NSUserDefaults standardUserDefaults]..."
should be: "if (indexNumber ==..."








