News Ticker

HeadFirst iPhone Development: Chapter 2

It has been a few days since we posted. The past week went by in a blink because all the craziness with the “special election.” OK… it was not a great excuse, but it was the only one we could come up with on short notice 🙂 Anyway, we finished reading about the picker, got an understanding of the various protocols we needed to implement, and got to work on copying the code sample from the book.

Copying code is easy. Getting it to work can sometimes be a little more difficult, especially if the code one is copying has something wrongwith it 🙂 Thinking we had a typo somewhere, we cycled a few times trying to get the code to compile errors-free without success. Finally we thought we should check the protocol definition in the documentation. That was when we discovered we needed a spacebetween “pickerView” and “numberOfRowsInComponent”…unlike what was in the book.

Once we got past that little “gotcha,” everything worked perfectly. These kinds of problems crop up all the time. They are frustrating, but are just a part of programming. The “auto-complete” feature in the Xcode IDE is a big help in reducing them. However, as one can see, they do still make their way into the code.

We are now on page 70. The next thing up is to hook up the “Tweet it!” button. We’ll tackle that later as the sun just came out. We are going to take a break and head out to the store to get some groceries for tonight’s dinner.

Leave a comment

Your email address will not be published.


*