Im trying to have 2 tableview in a single view controller with one tableview being static while the other dynamic.
My view controller is set up like so
The top half being the static tableview.
i created ibOutlets for both tableViews but i can't seem to be able to customise the tables.
override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCellWithIdentifier("cell2", forIndexPath: indexPath) as UITableViewCell
//tableview2 is the dynamic tableView.
if (tableView == self.tableView2){
print("Tableview2")
}
else{
println("HELLLO")
}
return cell
}
i get the error * Assertion failure in -[UITableView dequeueReusableCellWithIdentifier:forIndexPath:], /SourceCache/UIKit_Sim/UIKit-3318.16.14/UITableView.m:6116 2014-10-23 22:31:52.246 Recipe app[2857:504809] * Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'unable to dequeue a cell with identifier cell2 - must register a nib or a class for the identifier or connect a prototype cell in a storyboard'.