If you have developed your layout for an iPhone you might notice that the TableView does not expand from edge to edge on an iPad screen. The issue can be noticed also on an iPhone 7 Plus screen in landscape mode.

The reason for this is that the cellLayoutMarginsFollowReadableWidth property has a default value of true if you have not defined anything else. It makes the margins to follow the readable width, which is less than the width of an iPad screen or even an iPhone 7 Plus screen on a landscape mode.

I set the property to false.

tableView.cellLayoutMarginsFollowReadableWidth = false

The layout works like a charm now.

Leave a Comment

Your email address will not be published.