
Objective-C is an incredibly flexible language, but there are a few things I don’t think it handles very elegantly — private methods are one of those things. Private methods are important when designing your classes — keeping the implementation of your methods separate to the interface that users of your class see is good practice, and lets you change the way you implement things in future without making users of your class change their code.
Read on to find out how I implement private methods in my classes, and a few examples of how you might use them in yours.
Read more »
It appears that Apple’s World Wide Developer’s Conference (WWDC) is about iPhoneOS 4.0 this year. The focus of the advertising, the sessions and the announcements all appear to be firmly focused on iPhone and iPad development, and there’s scarce mention of the Mac in amongst the copy. This in and of itself is fine — the focus of the last 2 years (2008−2009) was pretty clearly on Mac OS X “Snow Leopard”, so given the impending release of a major operating system release for the iPhone (and eventually iPad) I can understand why they’d be focusing on their new baby.

But it’s raised a bit of an irate response from the more Mac-focused developers — “What about me?”. At first, I was incensed too — why would I want to pay close to $6000AUD for tickets, flights, accommodation and food to go to a conference that’s taken the focus off my primary development platform? I get it, though — it makes sense. And yeah, I’d get some benefit from the iPhone OS sessions. However, I’m pretty certain that I wouldn’t get $6000 worth of benefit this year, so I’m putting my hard earned money to one side for this year in the hopes that WWDC2011 is a better fit for my needs. As are a number of other high profile Mac developers (who I was really looking forward to catching up with, you bastards!). But that’s OK — there are more iPhoneOS developers than there are Mac developers these days anyway so WWDC will still sell out and the planet will continue to turn.
The only part I don’t understand is taking the Apple Design Awards away from Mac developers, but then the iPhone OS-based ADAs this year are a locked down shadow of what the ADAs used to be, so I don’t think I’ll waste too many words on this except to say that outwardly it’s a pretty shitty move from Apple. My oft-unused rational brain says that 5 weeks for ADA submissions and selection for both platforms seems a little tight, but all of the WWDC material feels rushed and unfinished this year. It’s as good an excuse in my brain as any.
My opinion is that next year’s WWDC will have a greater focus on whatever future version of Mac OS X Apple are working on — let’s call it “Mac OS X 10.7″ for the rest of this post, understanding that it might be called “Cecil”, or something far less interesting when it actually comes out. The design awards will have a Mac category again, and we’ll all get excited about what’s coming next.
But you want something a bit more inflammatory than that, don’t you?
Read more »
I’ve had the opportunity to work on a couple of smaller iPhone apps that include MKMapView components to show the location of stores and other items of interest. One of the things I found a little challenging was that the map views didn’t work quite the same way as those found within Apple’s Maps.app on the iPhone. I mean, sure — you can pan around the map with your fingers and zoom in and out by pinching, so the basics are there — but once you start tracking the user’s current location (showsUserLocation) all the nice stuff just falls away.
Here’s a quick rundown of how you can make your maps work the same way Apple’s do, without violating any of the SDK agreements you’ve so carefully read through (right?).
Read more »