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?