 <p><code>[playSoundButton = [UIButton buttonWithType:UIButtonTypeCustom] retain];</code> should read <code>playSoundButton = [[UIButton buttonWithType:UIButtonTypeCustom] retain];</code></p> <p>(i.e. move the first <code>[</code> further right to <code>UIButton</code>)</p>