0
The code below compiles but then displays the error 12main SIGABRT
in the appdelegate.swift
, what to do? And the tableview
already linked with source date and delegate to viewcontroller
.
2016-01-09 16:34:54.433 Tables[17730:805874] *** Terminating app due to uncaught Exception 'Nsinternalinconsistencyexception', Report: 'Could not load NIB in Bundle: 'Nsbundle (Loaded) ' with name 'Main''
File viewcontroller.Swift
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.
}
}