Limiting UITableView Width Across Different Table View Configurations

I have an iOS App which looks great on iPhone, portrait only, which makes a lot of use of UITableViews.

On iPad those tables look stretched out in Landscape.

On MacOS with Apple Silicon the app can be resized to any size and the table views look very stretched. There are views in the App which users want to resize so limiting app size not an option.

I've been modifying the app's table views to limit their width and centre them using constraints.

This isn't easy, it's a lot of work as UITableViewController doesn't allow for constraining the table width. Or does it?

So I've changed them to UIViewControllers with UITableView imbedded in the root UIView with constraints. Looks really nice.

Now I've just run into the limitation that static tables, which I have a number of, aren't allowed to be embedded. So how can I limit the width of them? I really don't want to add a lot of dynamic code.

Please tell me there's an simpler, more elegant method to what really makes a much more aesthetically pleasing UI on iOS App running on iPad and MacOS?

TIA!

Just to understand: why do you need static table view ?

I've found that very old thread but you may find useful information there: https://stackoverflow.com/questions/22364230/static-table-view-outside-uitableviewcontroller

Hope that helps.

App is 12 years old so pre-dates constraints and all other nice UI things that have come since then. Written in Obj C.

Yes, I've already tried using a container view but I couldn't get the tableview to behave and stick within the maximum width constraints of its new container. Might revisit.

For such a simple thing, limiting the width of table view, which creates such an aesthetically pleasing result on wider non-iphone screens I would have thought Apple might have added something simple to achieve ?

Limiting UITableView Width Across Different Table View Configurations
 
 
Q