 <p>Try changing <code>viewController = [[PhotoViewController alloc] init];</code> to</p> <pre><code>viewController = [[PhotoViewController alloc] initWithNibName:@"PhotoViewController" bundle:nil]; </code></pre> <p>(of course change the text string to whatever you called your xib file).</p>