Beta testing

This post gives a quick introduction to beta testing for iOS developers.  Specifically, I’ll walk through the major steps needed to legitimately send out a working copy of your app to testers without going through the app store – a process known as ad hoc distribution. Why beta test? All programmers become attached to their […]

iOS Quick Questions

This post introduces a publicly editable table of quick iOS questions and their answers.  Think of it as a very lite version of stackoverflow.com focused on iOS.  For example, you might ask the question, “How do I cancel a UIView animation?” and the answer is to use the [CALayer removeAllAnimations] method.  This question/answer pair is […]

Memory Warnings

This post gives a quick intro to dealing with memory warnings in iOS. I have to admit, I’ve avoided this subject for a looong time while learning iOS.  The first word says “these bugs will be incredibly annoying” and the second word says “you can just ignore these.”  Or rather, that’s what the back of […]

Faster Tables via Row Heights

If you have a table with different per-row heights, it may load slowly because your height method is called for every row in the table before any of the table is first displayed — and it’s very easy to write a slow height method. This post presents a one-method category to fix this slow-down; code […]

Don’t worry, Be happy

This post describes a correction to the Be category when dealing with class clusters. The Be category adds the be method to all objects and allows you to replace code like this: MyObject *obj = [[[MyObject alloc] initWithThing:thing] autorelease]; with code like this: MyObject *obj = [[MyObject be] initWithThing:thing]; This is useful in that it […]

Handling rotations in UIViewController

In this post I’ll give a few general tips for handling device rotations at the UIViewController level.  These tips are for code using iOS (formerly known as iPhone OS) 3.0 or later, which includes all iPad code. 1.  In willAnimateRotationToInterfaceOrientation:duration:, size and position the view for the new orientation. This sounds obvious and easy, but there […]

Fast numeric queries

This post introduces a relatively new algorithm, along with an open-source demo iPad app, that can pre-process a large set of numeric data to help perform extremely fast error-tolerant lookups at query time. Problems you can solve There is a class of algorithms known as locality-sensitive hashing (LSH) algorithms; this is a new one of […]

Clash-happy method names

This post lists a few special-case method names that are somewhat likely to be used accidentally by you but can only be used correctly if you understand their built-in functions.  Specifically: class, description, load, and hash. Why it’s tricky, by example Here’s an easy way to mess this up: start with a model object meant […]

Drag and drop in 3 lines