I know that it is possible that we can load multiple uitableview cells under the same xib in Objective-C, but is this also possible in swift?
I tried using the same logic as in Objective-C
var cellAuditDetails:AuditDetailsTableViewCell! = tableView.dequeueReusableCellWithIdentifier("customTrialDetailsCell", forIndexPath: indexPath) as! AuditDetailsTableViewCell
if indexPath.row == 0{
if(cellAuditDetails == nil)
{
cellAuditDetails = NSBundle.mainBundle().loadNibNamed("AuditDetailsTableViewCell", owner: self, options: nil)[0] as! AuditDetailsTableViewCell;
}
}
else{
cellAuditDetails = NSBundle.mainBundle().loadNibNamed("AuditDetailsTableViewCell", owner: self, options: nil)[1] as! AuditDetailsTableViewCell;
}

But the following error turned out ***Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'invalid nib registered for identifier (customTrialDetailsCell) - nib must contain exactly one top level object which must be a UITableViewCell instance'
Now, if I use only one cell, then its fine. But how can I load multiple cells in the same xib? Because it annoys him to take another xib for every new cell.
source
share