Add a background image to tables in a navigation view in a tabbed application

393 Views Asked by At

I have a tabbed application which then has a navigation controller. In each the navigation controller I an a table View Controller which obviously contains a table. I push a new table view controller from this one.

I want to put a background to the table but can only add an image infront of the table. I think this may be because I am adding the sub view in the table view controller, but I don't seem to be able to add it anywhere else.

Please could you help me, thanks.

2

There are 2 best solutions below

1
On

Try setting UITableView.backgroundView to say UIImageView of your choice and if that's not helping you too much, try setting the UITableViewCell.backgroundView for each of your cell to something similar. As far as I remember the UITableViewCell is opaque and the UITableView is not necessarily seen under it.

0
On

I have used a view controller to add the uiimage view then the table view controller view too. This gets the desired visual result, but the table is no longer in the navigation stack so when you clikc on the cell it doesn't push the nav controller.

Is there a way to talk between the table view controller and its view controller?