iOS 9 UITableView appearance

I tested using a UITableView in landscape orientation and it is programmatically set with constraint of Visual Format

H:|-0-[tableView]-0-[drawView(==0)]-0-|

where drawView is a custom view that I animated to hide.

. If the image is not showing, http://i.imgur.com/m1eTDPf.png

Is this normal for the UITableView in iOS9? It gets even more wierd when I have custom UItableviewcells with custom UIViews within them.

Replies

I'm also seeing the same only in UITableViewControllers that are created from code. UiTableViewControllers with associated XIBs look normal.

Hi,


did you check separatorInset? Maybe this is set to some strange default value.


Dirk

Are you talking about the left/right margins being much wider in landscape? If so, this is because of a new feature called readable content guides. It provides margins that are suitable for reading. So, in iPhone and portrait iPad they are very small margins, but in landscape iPad they are bigger. In iOS 9, UITableView's cell margins default to following the readable content guide. If you want to stop that, just set the tableView's cellLayoutMarginsFollowReadableWidth to NO/false.

This worked. They talk about in the WWDC 2015 video 205 Getting started with MultiTasking on iPad on iOS 9. Starting at the 17min mark.

Thanks.


set cellLayoutMarginsFollowReadableWidth to "NO" work for me. Otherwise the margins between imageView, textLabel & detailTextLabel are to wide.

Just for info, the iPad pro has wide readable layout guides in both landscape and portrait. Which makes sense given how big it is.