【发布时间】:2009-05-22 15:04:26
【问题描述】:
有没有办法在 UITableViewController 上设置背景视图?
我尝试使用在UIViewController 上使用的代码,但视图会覆盖表视图的所有内容。如果我在cellForRowAtIndexPath-method 中添加背景视图,它根本不会显示。有没有人这样做过或知道如何做到这一点?
这是我正在使用的代码:
UIImage *image = [UIImage imageNamed: @"background.jpg"];
UIImageView *backImage = [[UIImageView alloc] initWithImage: image];
[self.view addSubview: backImage];
[self.view sendSubviewToBack: backImage];
【问题讨论】:
标签: iphone background uitableview