iPhone Development

iPhone Development. You may have noticed that I haven't posted in a while. That's because I've been hitting the books hard (PDFs actually). Learning a new language syntax is one thing, but then there is the new development environment (Xcode) which has a lot of drag and drop. Drag and drop sounds like a good idea, however, when I first started, I had no idea how to connect the things I was dropping.

Ironically, the basic documentation of methods (object functions) mostly just gives clues, and then points to sample code projects for more info, which usually shows a working example with comments that repeat the basic documentation. It's actually the more complex samples that have comments about why they chose a particular method, for ease of use, or performance, or conformance to a certain standard.

Objective-C is still C and I have been frustrated by how hard it is to find good documentation on standard C. It's assumed that you know it, and not just in Apple's tools; the internet is also a frustrating place to search for practical documentation on C. I mean, come on, it's a single letter. Even when you do find stuff, there's a bazillion sites, but no "go to" site popping up in google for all your basic C needs. Just a simple list of functions and operators with quick comments about how to use them and what each argument actually means. It does help to be searching for C89 or C99 since those are labels of standards set for which functions were required in a C compiler to qualify as a C compiler meeting that standard... yeah, hard to word such a statement.

The drag and drop connections to code issue was the hardest part. There are thousands of options in a drag and drop interface, and when you look at sample code, you might look all day and never realize how the programmer got the text on a label to change color. Makes me think that sample projects should have screen casts of every step taken to create it, from opening Xcode to hitting the final "Build and Go" button. That way the programmer couldn't forget to say something, their mouse movements would tell all.

The key to finding connections is the "Inspector" pallet, second tab on top, called "Connections". The icon is a blue circle with a wide arrow pointing to the right in white in the middle of it and shadow under it. The things that show up here are based on the object that's selected, the class that's set on the 4th tab (Identity) and the IBOutlets and IBActions setup in the code of that class. I know this paragraph will help some newbies.

Reply

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

CAPTCHA
Able Mac requires that you successfully pass this test to prove you're smarter than the average advertising program.