iPhone - Setting background on UITableViewController

后端 未结 6 1544
借酒劲吻你
借酒劲吻你 2020-12-04 10:50

Is there any way to set a background view on a UITableViewController?

I try with the code I am using on a UIViewController, but the view comes over all

6条回答
  •  庸人自扰
    2020-12-04 11:32

    I know it's been a long time, but just for the record.. I Think I found a better solution using UITableView.backgroundView:

    UIImageView *imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"lisbon.png"]];
    
    self.tableView.backgroundView = imageView;
    [imageView release];
    

    I tried with an image size of 320x480 on iPhone, and works perfect (I have tried with .jpg also).

提交回复
热议问题