In the storyboard, you must define an ID for cells such as the image below 
Then in cellForRowAtIndexPath you need to use a specific identifier for a specific cell, like this
func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { if indexPath.row == 0 { let cell: UITableViewCell = UITableViewCell(style: UITableViewCellStyle.Default, reuseIdentifier: "Identifier1") //set the data here return cell } else if indexPath.row == 1 { let cell: UITableViewCell = UITableViewCell(style: UITableViewCellStyle.Default, reuseIdentifier: "Identifier2") //set the data here return cell } }
Rajat Sep 15 '16 at 16:38 2016-09-15 16:38
source share