6

I'm making a custom cell on UITableView using storyboard and I assign each element to class.But when I run the project it says:

Must translate autoresizing mask into constraints to have _setHostsLayoutEngine:YES.

here is my code:

var image : UIImage = UIImage(named: foodImages[indexPath.row])!

    let cell = tableView.dequeueReusableCellWithIdentifier("timelineCell", forIndexPath: indexPath) as! UITableViewCell
    let object = dataArray[indexPath.row] as NSDictionary
    (cell.contentView.viewWithTag(1) as! UIImageView).image = image
    (cell.contentView.viewWithTag(2) as! UILabel).text = object["firstName"] as? String
    (cell.contentView.viewWithTag(4) as! UIImageView).image = UIImage(named: "des5.jpg")


    return cell

I got the error on : let cell = tableView.dequeueReusableCellWithIdentifier("timelineCell", forIndexPath: indexPath) as! UITableViewCell

How can I fix that?

Ega Setya Putra
  • 1,645
  • 6
  • 23
  • 51
  • Below link might be helpful: http://stackoverflow.com/questions/24217195/why-do-i-get-must-translate-autoresizing-mask-into-constraints-to-have-sethost – IamAnil Sep 10 '15 at 10:28

0 Answers0