Archive for October, 2009


Design Trends

So here’s a couple of interesting articles about designing your iPhone app, and its site; apparently the distinct similarity in name is an example of convergence, as the authors do appear to be, in fact, different.

iPhone App Design Trends

For the past two years, the elegant iPhone has housed some of the most poorly designed applications you could imagine. The hype surrounding iPhone has prompted many designers across the globe to try their skills with the new mobile medium. The result are literally thousands of various iPhone-applications that are often hardly usable and counter-intuitive. However, some designers invest a lot of time and efforts into creating usable and original user interfaces (yes, there are usable and creative UIs).

This article explores the ways in which designers use graphical elements and screen interactions to create iPhone-applications that are easy on the eyes and mind…

iPhone App Site Design Trends

To compete with thousands of iPhone apps in the App Store, having a good app icon is not enough. A nicely designed website for the app is very important. A beautiful website helps to drive traffic in and also makes your app stand out from the crowd. This post showcases a gallery of appealing iPhone app sites and common design trends that I see…

Well worth the read, the both of them!


Snippet: Ordinal Days

So let’s say you have to index into an array of somethings for each day of the year — so you want an easy way to figure out what the appropriate index is for some arbitrary, date, like today. Like most things in Cocoa, it’s easy once you know how to sort out the ordinality of a day … but if you don’t, it may take you a while to figure out where. And here’s that where:

- (NSInteger)dayOfYearForDate:(NSDate *)date
NSCalendar *calendar = [[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar];
NSInteger day = [calendar ordinalityOfUnit:NSDayCalendarUnit inUnit:NSYearCalendarUnit forDate:date];
return day;

Now you know!


Snippet: Unknown Random Selection

Here’s a nifty little snippet found in this iphonesdk thread for selecting randomly from among an unknown number of objects in an array. Rather than build some sort of collection of the objects/indices/whatever that satisfy your test and then randomizing, combine the selection with the test!

NSObject *result = nil;
int candidateCount = 0;
for (NSObject *test in arrayOfObjects)
if ([test isACandidate])
if ([utilRandom: ++candidateCount] == 0)
result = test;

where utilRandom:num returns { 0 .. num – 1 }. When done, candidateCount is number of objects that matched your test query and result has a 1/candidateCount chance of being each of them. Nice little low-overhead convenience we could’ve used a number of times, that.


Legal Guide

Here’s a link every iPhone developer should take a quick read over, just in case there’s something there you don’t know:

A Practical Legal Guide to iPhone Application Development

By examining the iPhone SDK Agreement, Apple’s End User License Agreement, and federal copyright and trademark registration, this guide provides an introductory overview of the common legal issues surrounding iPhone Application development, and the measures developers can adopt to minimize liability and maximize protection of their intellectual property rights.

Not that we know enough about Messr. McHale LLC to recommend them in particular … but you definitely should have someone on tap who knows the legal beagle stuff!

h/t: Cocoa and Cocoa Touch Developers!


Sound helpers

Here’s a couple iPhone sound playing classes that may turn out handy:

Playing backgroud music is straightforward AudioQueue track playing, but it handles all the bookkeeping including magic cookies for properly handling files of any understandable format, which would be helpful if you don’t feel like going through and converting your tracks to caf iPhone-friendly goodness.

New SoundManager Class is an OpenAL wrapper that apparently has 3D sound working well — which we actually haven’t encountered a need for yet, but as soon as we do run into something like that, this is definitely what we’ll start with!


Screen drawing

Here’s a cute little tutorial — how to make a drawing application on the iPhone, in just a few lines of code:


Okay, it’s not much of a drawing application … but hey, it’s a start to play with!


Roundup: Crash Reporters

If programs you write ever crash — so, obviously, we’re not talking about trolls today! Ho ho! — it might have occurred to you that it would be nice to have some automated reporting about what actually happened to the angry users’ machine. It’s a bit easier on the iPhone these days now that Apple provides reports on crashes in iTunes Connect … if the user sends them when syncing, etc. But there’s absolutely nothing like that on the desktop; they go into the Apple black hole and never come out. So you might want to do it yourself. And here is a list of more options than we were ever aware of!

The only one of great interest to iPhone-only programmers, apparently, is still PLCrashReporter which we’d noted here a while back.

If you need a solution applicable to Windows &/or Linux, Breakpad the Mozilla crash reporter (also used by Google apparently) would be your flavor.

Mac desktop only solutions, some of which include feedback and other various goodies, are:






ILCrashReporter and branch ILCrashReporter-NG


Should be a flavor for everybody in there somewhere!


Tips: Address Book

Here’s a couple references for you if you’re just delving into the Address Book APIs:

Adding a Contact to the iPhone Address Book

Nice clear walkthrough. If only Apple documentation was so well written!

iPhone dev tips for synced contacts

Record IDs are pretty much guaranteed to change on you! Exchange-synced contacts can have NULL fields that are impossible to create any other way! Read this before you get bitten!


Snippet: UIKeyboard buttons

So if you’ve done any complicated-ish UI work on the iPhone, you’ve probably thought to yourself “Wouldn’t it be neat if we could add some auxiliary buttons to the keyboard?” And you have doubtless thought that to yourself if you’ve ever used a UITextView allowing return characters to be entered … as there actually is no integral way to dismiss it then! Something like, oh this for instance:


Well, here is one way to go about doing so. And a pretty simple way, at that.

Now, having had some spats with Apple over the use of undocumented views ourselves, we’re just a teensy bit leery of the official acceptability of this method, which is to watch for the system notification a keyboard is coming up, then hunt through all the views looking for it …

// Check to see if the description of the view we have referenced is UIKeyboard.
// If so then we found the keyboard view that we were looking for.
if ([[keyboard description] hasPrefix:@"<UIKeyboard"] == YES)

… but hey, it works! So although you might want to have a ready Plan B just on the off chance Apple ever decides that UIKeyboard views are Completely Access Verboten™ like they did to us with UIImagePickerView, in the meantime this is a simple way to work around a mildly dysfunctional UI situation, indeed.


Roundup: Sound Design

So let’s say you’re looking for some extra-special sound effects for your game (or whatever). Sure, there’s oodles and kaboodles of clip sound collections out there, and online sources like

The Freesound Project



but they tend to never be just quite what you’re looking for, do they? If you have delusions of competency grandiose enough to want to muck around with creating sounds yourself, here’s a couple tools you may not have heard of that let you do pretty nifty stuff:

IRCAM’s AudioSculptexamples here

cfxr, a Cocoa port of sfxr

Or, of course, if you have an actual budget, you could just hire a professional to do it. And here’s a list of designers that we’ve stumbled across mentions of on the various iPhone-related places we frequent, with at least no negative feedback attached:



Noise Buffet

Sound for Games Interactive

Impact Game Audio

Marios Takoushis

Todd Kinsley

Not that we’re actually recommending any of these; but presumably they would be a good start for designers that aren’t completely unfamiliar with the iPhone environment.

And as a ‘one more thing’ tip, if once you finally get Your Perfect Background Music Loops™ you’re having trouble getting them to sound seamless, the tips in here could be of assistance:

Gapless looping MP3 tracks

Any other designers, tools, sites, whatever that you figure should appear here, Dear Readers?