Apples By The Pound
Diamonds, gold, and other precious things are valued by weight — why not electronics?
It turns out that iPod Nanos cost about $3,866 per pound.
Diamonds, gold, and other precious things are valued by weight — why not electronics?
It turns out that iPod Nanos cost about $3,866 per pound.
Note: This is a little out of date, since the Beta 3 build automatically generates an empty XIB and the code for including it in new projects. If you’re looking for Apple’s introductory tutorial on how to build applications with Interface Builder, click here.
So, the trick to using Interface Builder is figuring out where to put the files, and plugging the XIB interface into the app.
The file question is easily answered: File > Write Class Files to the directory in your project where the rest of your classes live. For really simple apps with a single view, select your existing AppDelegate class and IB will merge the changes for you. You’ll also see a new .xib file in your classes directory, containing your interface.
Connecting the XIB interface is also relatively straight forward. In your AppDelegate file, change what self.contentView points at:
self.contentView = [[[NSBundle mainBundle] loadNibNamed:@"XIBFileName" owner:self
options:nil] objectAtIndex:0];
Where XIBFileName is the name of the generated XIB file without the .xib extension.
Anyhow. I’m still learning, and this is with a beta release of the iPhone SDK, so you’re welcome to leave comments if you have better ideas or tips on working with IB for the iPhone. Thanks!
I spent the weekend building a native iPhone app. It’s unfinished, and a little rough around the edges … but I’m happy with the experience so far.
The concept is relatively simple: I want an app to search through (and show off) my collection of international banknotes when I’m out and about.
There are a few hurdles, though.
For example, it’s been over a decade since I worked on a reasonably sized C application. So, I’m getting back into the swing of things with Objective-C style pointers and memory management, and remembering how much I hate segmentation faults and bus errors.
Also, being new to Objective-C and Mac development, this learning curve looks a bit like a wall. Thankfully, there is quite a bit of sample code out there, but it’s not entirely consistent … which I guess is par for the course for a beta development system and a OS that hasn’t been released yet.
I’m learning, but I’m pretty sure my code is gnarly enough to make a Real Mac Developer nauseous. That said, if you are a Real Mac Developer with a strong stomach, please drop me a line — I’d love to show you what I have, just so that you can tell me how bad it really is (and, hopefully, tell me how I can make it better).
At this point in the game, there are a few things I’m very pleased with:
And, of course, a few things I’m rather surprised to find, and desperately hope for resolution on:
Anyhow, good points and bad points, but on the whole it’s been a good experience so far. The NS* classes are all stable and well documented, and the UI* classes and documentation are about what you’d expect from an API in beta.
I’m keen to get a code review from someone who knows what they’re doing, and I’m eagerly awaiting the next update to see what’s changed. Unfortunately, I think I’ll have to have to wait until June to get a real iPhone — I’m betting that the next generation iPhone will be released along with the SDK and OS 2.0 at WWDC ’08.
Update: I found an Interface Builder + iPhone tutorial, and I posted a short summary about how to interface with the IB files.
I crapped a brick the first time I saw the iPhone, and another when I heard that it wasn’t going to be open to third party developers or applications. I understand their reluctance to let other people’s software near their proprietary media platform, but come on — for the iPhone to be a “revolution,” they need the support of the businesses and individuals who are chomping at the bit to write widgets that solve problems Apple hasn’t even dreamed of.
Anyhow, I guess the clamor over the last few months has been loud enough to be heard at Apple:
For Jobs, the question of third-party software was now a question of “when” rather than “if:” the main issues now were to protect the phone against crashes and security holes, which he said have frequently ruined the experience for smartphones in the past. Pressure on the firm to change its current, closed-off approach was evident in Jobs’ reactionary tone.
“We would like to solve this problem,” he said. “And if you could just be a little more patient with us, we’ll do it.”
Yay!
peat dot org is powered by WordPress
Entries (RSS) and Comments (RSS).