title: Different StoryBoard for each screen size swift
body: <p>How do I set Different Storyboards for each possible screen size in Swift?</p>
  
  <p>I already have the Objective-C code.</p>
  
  <p>Please, no Auto Layout, I don't need it.</p>
  
  <p>But how do I convert it to Swift? I am new to Swift.</p>
  
  <p>Here is code for Objective-C:</p>
  
  <p><strong>AppDelgate.m</strong> file</p>
  
  <pre><code>- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
      // Override point for customization after application launch.
  
      // int screenHeight = [UIScreen mainScreen].bounds.size.height;
      // NSLog(@"Screen Height is %i", screenHeight);
  
      // grab correct storyboard depending on screen height
      UIStoryboard *storyboard = [self grabStoryboard];
  
      // display storyboard
      self.window.rootViewController = [storyboard instantiateInitialViewController];
      [self.window makeKeyAndVisible];
  
      return YES;
  }
  
  - (UIStoryboard *)grabStoryboard {
      // determine screen size
      int screenHeight = [UIScreen mainScreen].bounds.size.height;
      UIStoryboard *storyboard;
  
      switch (screenHeight) {
              // iPhone 4s
          case 480:
              storyboard = [UIStoryboard storyboardWithName:@"Main-4s" bundle:nil];
              break;
  
              // iPhone 5s
          case 568:
              storyboard = [UIStoryboard storyboardWithName:@"Main-5s" bundle:nil];
              break;
  
              // iPhone 6
          case 667:
              storyboard = [UIStoryboard storyboardWithName:@"Main-6" bundle:nil];
              break;
  
              // iPhone 6 Plus
          case 736:
              storyboard = [UIStoryboard storyboardWithName:@"Main-6-Plus" bundle:nil];
              break;
  
          default:
              // it's an iPad
              storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
              break;
      }
      return storyboard;
  }
  </code></pre>