title: How to make iPhone and iPad version of an app?
body: <p>I am trying to make an app which works on both iPhone and iPad. I am looking how to make an interface compatible on both. When the app loads I am displaying a table view. How can I load different nibs based on device? I am using this to switch between nibs.</p>
  
  <pre><code>if ([[UIDevice currentDevice] respondsToSelector:@selector(userInterfaceIdiom)]) 
      {
          if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad) 
          {
              device = @"iPad";
          }
          else 
          {
              device = @"iPhone";
          }
  
      }
  </code></pre>
  
  <p>But in MainWindow.xib it says view is loaded from the view controller for iPhone. Can I make this dynamic based on device? ie I want to show from the start of app different nibs based on device.
  Thanks.</p>