title: Programmatically UITableView using swift
body: <p>I'm trying to create a simple tableView programmatically using swift, so I wrote this code on  "AppDelegate.swift" :</p>
  
  <pre><code>    func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: NSDictionary?) -&gt; Bool {
      self.window = UIWindow(frame: UIScreen.mainScreen().bounds)
  
      var tvc :TableViewController = TableViewController(style: UITableViewStyle.Plain)
      self.window!.rootViewController = tvc
  
      self.window!.backgroundColor = UIColor.whiteColor()
      self.window!.makeKeyAndVisible()
      return true
      }
  </code></pre>
  
  <p>Basically I added the TableViewController creation and added to the window. And this is the TableViewController code:</p>
  
  <pre><code>class TableViewController: UITableViewController {
  
  init(style: UITableViewStyle) {
      super.init(style: style)
   }
  
  override func viewDidLoad() {
      super.viewDidLoad()
   }
  
  override func didReceiveMemoryWarning() {
      super.didReceiveMemoryWarning()
      // Dispose of any resources that can be recreated.
  }
  
  // #pragma mark - Table view data source
  
  override func numberOfSectionsInTableView(tableView: UITableView?) -&gt; Int {
      return 1
  }
  
  override func tableView(tableView: UITableView?, numberOfRowsInSection section: Int) -&gt; Int {
      return 10
  }
  
  
  override func tableView(tableView: UITableView?, cellForRowAtIndexPath indexPath: NSIndexPath?) -&gt; UITableViewCell? {
      var cell:UITableViewCell = self.tableView.dequeueReusableCellWithIdentifier("reuseIdentifier", forIndexPath: indexPath) as UITableViewCell
  
      cell.textLabel.text = "Hello World"
  
      return cell
  }
  </code></pre>
  
  <p>}</p>
  
  <p>So, when I try to run the code I receive this message: </p>
  
  <blockquote>
    <p>Xcode6Projects/TableSwift/TableSwift/TableViewController.swift: 12: 12: fatal error: use of unimplemented initializer 'init(nibName:bundle:)' for class 'TableSwift.TableViewController'</p>
  </blockquote>
  
  <p>The error occurs when the compiler is executing the </p>
  
  <blockquote>
    <p>super.init(style: style)</p>
  </blockquote>
  
  <p>Any thoughts ?</p>