Custom UITableViewCell in Swift Ios

func tableView(tableView: UITableView!, cellForRowAtIndexPath indexPath: NSIndexPath!) -> UITableViewCell!
 {

    var  cell:SimpleTableCell! = tableView.dequeueReusableCellWithIdentifier(simpleTableIdentifier) as? SimpleTableCell

    if (cell == nil)
    {
        let nib:Array = NSBundle.mainBundle().loadNibNamed("SimpleTableCell", owner: self, options: nil)
        cell = nib[0] as? SimpleTableCell
    }

    cell.nameLabel.text = tableData[indexPath.row]
    cell.thumbnailImageView.image = UIImage(named:thumbnails[indexPath.row])
    cell.prepTimeLabel.text = prepTime[indexPath.row];

    return cell;
}

Popular posts from this blog

How to Use pagination ScrollView in Swift

UISearchBar search text color , background color swift 3

How To Add Multiple Line in Lable in Swift Ios