设置一般View的背景
UIImageView *imgView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"back-568h"]];
imgView.frame = self.view.bounds;
imgView.autoresizingMask = UIViewAutoresizingFlexibleWidth;
[self.view insertSubview:imgView atIndex:0];
设置UITableView的背景UIImageView *imgView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"back-568h"]];
imgView.frame = self.view.bounds;
imgView.autoresizingMask = UIViewAutoresizingFlexibleWidth;
[self.tableView setBackgroundView:imgView];
设置View的背景颜色,使用图片,效果和设置背景图片比较类似
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请
点击举报。