I get the impression that lots of readers of these forums don't know how to get the most out of the Xcode documentation.
There is a wealth of information in the Xcode docs, but there are some tricks to making the most of it.
First, the basics.
This tutorial is based on Xcode 4.3, the latest version of Xcode, but should be pretty accurate for all versions of Xcode >= 4.0. Xcode 4 uses a totally different user interface for help than Xcode 3.x (Ok, it uses a totally different interface for EVERYTHING
The Xcode documentation is in the organizer window. The fastest way to get to it is to select "Documentation and API reference" from the Xcode help menu. That brings the organizer window forward, selects the documentation tab, and selects the search tab inside the documentation tab. The keyboard shortcut for this is command-option question mark, which requires 4 fingers to press (since question mark is a shifted key.)
Once you have the help window up and the have selected search, it defaults to searching ALL the documentation sets that are installed.
This is bad for 2 reasons. First, it's really, really slow to search 3 versions of the iOS SDK and several versions of the Mac OS SDK. It can take 15 seconds or more to come back with results.
Worse, the Mac APIs are similar to, but different from, the iOS APIs. There are functions that work in Mac OS that don't work in iOS. Worse still, some of these APIs work if you build them for the simulator, but will not work on the device. that's because the simulator actually links against Mac OS frameworks. We got bit by this badly early in our efforts with iOS. My partner developed a very nice multi-file async download engine based on NSURLDownload, a file download framework. He tested it and gave it to me to integrate into a project I was working on. I got it integrated in the simulator, and everything seemed great. That was until I tried to run it on my phone. At that point it failed to link, because NSURLDownload is not supported in iOS It's Mac-only. It works on the simulator, but not on an actual iOS device. We had to do a heart-lung transplant on our download engine to make it work.
You can save yourself a lot of pain and suffering by not searching Mac frameworks, and only searching the iOS version you are working on. It's not obvious how to do that, however.
What you have to do is click on the little magnifying glass in the search box, and select "show find options". It looks like this:
Once you do that, you want to select ONLY the doc-sets you care about. If you're building against the iOS 5.0 SDK, select that. If your deployment target is iOS 4.2, though, then you should only search in that doc set. That has a double benefit: It keeps you from finding new API calls that are only available in the latest OS, and it speeds up searching dramatically.
Here's what that looks like:
Another tip: The Xcode docs include links to lots of useful sample applications that show how to use different APIs. For example, if you search on "MKMapView", you'll see results under "Reference", "System Guides
, "Tool Guides", and "Sample Code"
The Sample Code group includes sample applications that use the MKMapView class. The "WorldCities" app, for example, creates a map of major world cities. Seaching on "CLLocationManager" returns a few of the same applications, plus applications like "LocateMe" that use the location manager but not map views.
One final tip: By default, Xcode 4.x only installs the most recent SDK versions and their documentation. You have to ask to download older SDK versions and the documentation to go with it.
To download older SDKS and documentation, go to the Xcode preferences window (command ",") and select the "Downloads" tab. Then select either "Documentation" or "Components"
and click the install buttons for any older SDK or documentation set versions that you need. Here's what that preferences screen looks like: