I use size classes in an application for iOS 8 only, and I have a view inside a UITableViewCell that has a flexible width. Its automatic layout constraints are defined as follows:

As you can see, its width varies depending on the width / orientation of the device.
When I print its frame in cellForRowAtIndexPath , I see (180.0, 10.0, 400.0, 60.0) that shows a width of 400 . But when I measure the view in the simulator, it is only 175 wide , which is supported by the fact that the content of my view is truncated (I draw some things inside it).
How do I know when the UITableViewCell outlines and routines are fully executed so that I can redraw things inside my view?
Update
In cellForRowAtIndexPath I do the following to get the cell:
let cell = tableView.dequeueReusableCellWithIdentifier("TimeTypeCell", forIndexPath: indexPath) as! TimeTypeCell let customField = customFields[indexPath.row] cell.fieldNameLabel.text = customField["name"] as? String cell.fieldValueLabel.text = customField["total"] as? String cell.graphData = customField["totalGraph"] as! [Double] cell.fieldGraph.dataSource = cell.self cell.fieldGraph.delegate = cell.self cell.fieldGraph.reloadData()
ios uitableview autolayout swift
Clifton labrum
source share