SIGABRT error in UITableView

0

The code below compiles but then displays the error 12main SIGABRT in appdelegate.swift , what to do? And tableview is already bound to data source and delegate to viewcontroller .

  

2016-01-09 16: 34: 54.433 Tables [17730: 805874] *** Terminating app due   to uncaught exception 'NSInternalInconsistencyException', reason:   'Could not load NIB in bundle:' NSBundle      (loaded) 'with name' Main ''

Viewcontroller.swift file

import UIKit

class ViewController: UIViewController, UITableViewDelegate {



    var cellContent = ["Ana, Lucia, Maria, Ja"]

    override func viewDidLoad() {
            super.viewDidLoad()
            // Do any additional setup after loading the view, typically from a nib.
        }

        func tableView(tableView: UITableView, numberOfRowInSection section: Int) -> Int {
        return cellContent.count
        }

        func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
        let cell = UITableViewCell(style: UITableViewCellStyle.Default, reuseIdentifier: "Cell")

        cell.textLabel?.text = cellContent[indexPath.row]

        return cell
        }


        override func didReceiveMemoryWarning() {
            super.didReceiveMemoryWarning()
            // Dispose of any resources that can be recreated.
        }


}
    
asked by anonymous 09.01.2016 / 20:17

1 answer

0

This error can usually occur for 2 reasons:

  • Make sure your storyboard is added to your Copy Bundle Resources :

  • Checkthatthepropertiesofyour.storyboardor.xibarelinkedtothetargetofyourproject:

    
11.01.2016 / 14:37