The easiest way to do that is to use different custom cells in method cellForRowAtIndexPath for different cases.
So you should write some conditions where you will describe witch class for cell should be used as for example I use the number of the indexPath.row which means that the number of the row from the top (when you write condition indexPath.row == 1 so it basically means top row or top cell in the section of the tableView):
func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
switch indexPath.row {
case 0:
let cell = tableView.dequeueReusableCellWithIdentifier("Cell1", forIndexPath: indexPath) as! FirstTableViewCell
case 1:
let cell = tableView.dequeueReusableCellWithIdentifier("Cell2", forIndexPath: indexPath) as! SecondTableViewCell
//case 2:
//... some other cases you need
//case n:
default:
let cell = tableView.dequeueReusableCellWithIdentifier("Cell3", forIndexPath: indexPath) as! ThirdTableViewCell
}
return cell
}
But you have to make different classes for your cell to meet your own requirements for each cell.
Hope it helps.