views:

489

answers:

5

Is there a quick-reference guide to the iPhone SDK that's as fast and easy to use as one of those little O'Reilly books, or JavaDoc?

I'm new to iPhone SDK programming. I need reference material. Let's say I want to know if the string class has a "reverse" function. For Java I go to http://java.sun.com/javase/6/docs/api/ and browse down to find "String". Then I can see everything about String, with hyperlinks to Serializable and Character. I don't see a "reverse" method, but look, there's a hyperlink to StringBuilder -- aha, there's StringBuilder.reverse(). Total elapsed time 30 seconds.

For the iPhone I go to http://developer.apple.com/iphone and log in. Everything seems to be slower here. There are fewer cross-links than in the Java documentation, and each link seems to pull in a big page that takes a long time to load. Just the page for NSString takes 30 seconds to load fully. Maybe I just don't know my way around the documentation yet, but it seems to be much harder to browse for what you want. There's no equivalent of flipping through a book, or if there is it takes 30 seconds to turn the page.

The iPhone platform is immense -- for almost anything you'd want to do, there's got to be a class somewhere that does it. The built-in help in XCode is good but I'm still lost with it.

How do YOU go about finding that class you need? Is there a better way?

+2  A: 

When I started with iPhone dev I used the iPhone Developers Cookbook, it has examples of how to do specific things. It's easy to pick out one piece of functionality to try out.

I'd highly recommend checking it out.

paulthenerd
A: 

If the speed of browsing documentation is the issue, I recommend downloading the related doc sets and browse them locally in Xcode. In Xcode's preferences, select the last "tab" (Documentation) and click the "GET" button next to the documentation test you want. (I'm on Snow Leopard and Xcode 3.2, but it should be similar on Xcode 3.1.x as well.)

If finding what you need is the issue, I second @paulsnotes's answer — the "cookbook" approach is very helpful form a task-based exploration standpoint. Also, when you find something you were looking for, and it took much longer than usual, provide feedback on Apple's documentation. Each page has links at the bottom. You can suggest what classes, sample code, etc. would be useful to cross-link to make it easier to find what you need.

Quinn Taylor
+2  A: 

I just use XCode's built-in help system. Right-click a class or symbol name, and choose "Find Selected Text in API Reference". You can also do "Jump to Definition", which will open the header file where that symbol is defined.

More info on this stuff here.

zpasternack
A: 

If we are recommeding books, this is excellent for a beginner, it gets you up to speed very quickly while leading you through creating highly functional apps you can use as a jumping point for your own:

Beginning Iphone Development

ennuikiller
+2  A: 

Use the XCode hot keys to jump to documentation on anything - in XCode for Leopard, you can double-click on something like "NSString" while holding down "Option" and it will take you to the documentation for that class. You can do the same thing for method names.

In Snow Leopard that key combo opens up a little help box with a summary of what you clicked on, "Cmd-Option double-click" brings up the docs as with Leopard.

The built in docs are very good and even provide links to sample code (if any exists for the subject in question).

There's also a way to generate your own XCode compatible documentation with Doxygen, just like you could with Javadoc:

http://developer.apple.com/tools/creatingdocsetswithdoxygen.html

Kendall Helmstetter Gelner