user260277 user260277 - 1 year ago 156
iOS Question

How do I change the table and cell backgrounds to custom images in Interface Builder and xcode?

How do I change the basic table to custom images in Interface Builder and xcode?

Interface builder provides a boring white background for each cell. I want it to look more custom.

I want to change that into something like this:

Answer Source

You can't do it all in interface builder and there's quite a lot of documentation on how to acheive this. I'll give you a few leads you can follow on your own:

  1. The tableView background can only be set to a solid color or transparent, so if you want a gradient or an image background the best way would be to set the tableView.backgroundColor to [UIColor clearColor]. To actually create the background you can use a UIImage and place the table view above it. Make sure not to use UITableViewController and just use a UIView and add an UIImage to it and a UITableView.

  2. The cells of the table can be created in interface builder or in code. In interface builder you'll find in the library a table view cell which you can customize. Google on creating UITableViewCell from NIBs

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download