in my viewDidLoad I register my nib:
tableView.register(UINib(nibName: "MyCell", bundle: nil), forCellReuseIdentifier: "MyCell")
which I fetch in my cellForRowAtIndexPath:
guard let cell = tableView.dequeueReusableCell(withIdentifier: "MyCell") as? MyCell else {
return UITableViewCell()
}
// I do get here, but no constraints exist
In my MyCell.xib which is a UITableViewCell, I layout my cell content with auto layout; but when running the app, all the cells subviews stick in the upper left, no constraints exist.
How can I achieve that the auto layout of MyCell.xib 'survives'?