I have read some Apple Human Interface Guidelines, a few tutorials on Objective C (which looks nice) and my "The iPhone Devloper's Cookbook" by Erica Sadun. It's time to write "Hello World".
Erica includes a simple example that displays a static image that contains the words "Hello World". I decided to create her example from first principles in XCode by way of exploring the IDE rather than just to open the projects from her site. That all worked fine.
Then I moved on to the next example. A trivial app that displays some flowers on screen that users can drag. I modified the existing Hello World more or less as per her code. It displayed flowers but they weren't draggable. Setting breakpoints showed that the methods associated with dragging weren't being called.
Long story short, I was adding the flowers as children of a UIImageView instead of as children of a UIView. Children of a UIImageView seem not to get the drag messages. This is no doubt in the Completely Obvious (R)(TM) category. Anyway, we're off and racing now.
I think I'll follow my usual approach to learning a new language and framework. I'll spend a week messing with the examples in the book and rereading sections once I have figured out from the online documentation what the book was trying to tell me anyway.
The book is better than many in its genre but it does assume a certain Macintosh development programming background e.g. in discussing the file Info.plist "It works in the same way Info.plist files work on the Mac." Poking around in the IDE, it's not hard to see where the resources live and the analogues of a manifest in Windows.
Sunday, February 8, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment