// 设置View的背景
UIImageView *imgView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"bg_bg"]];
imgView.frame = self.view.bounds;
imgView.autoresizingMask = UIViewAutoresizingFlexibleWidth;
[self.view insertSubview:imgView atIndex:0];
// 设置View的背景颜色,使用图片,效果和设置背景图片比较类似(个人更喜欢这种方法)
[self.view setBackgroundColor:[UIColor colorWithPatternImage:[UIImage imageNamed:@"bg_bg"]]];
// 设置UITableView的背景view
UIImageView *imgView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"bg_bg"]];
imgView.frame = self.view.bounds;
imgView.autoresizingMask = UIViewAutoresizingFlexibleWidth;
[self.view setBackgroundView:imgView];