给TableView设置背景图片
2015-05-28 23:03
302 查看
UIImage *image = [UIImage imageNamed:@”1.jpg”];
UIImageView *imageView = [[UIImageView alloc] initWithFrame:[UIScreen mainScreen].bounds];
// 将图片视图加到视图上
[self addSubview:imageView];
imageView.userInteractionEnabled = YES;
self.myTabelView.alpha = 0.5;
// 将tableView加到图片视图上
[imageView addSubview:self.myTabelView];
cell.backgroundColor = [UIColor colorWithRed:123.0 / 255.0 green:23.0 / 255.0 blue:45 / 255.0 alpha:0.1];
return cell;
}
UIImageView *imageView = [[UIImageView alloc] initWithFrame:[UIScreen mainScreen].bounds];
// 将图片视图加到视图上
[self addSubview:imageView];
imageView.userInteractionEnabled = YES;
self.myTabelView.alpha = 0.5;
// 将tableView加到图片视图上
[imageView addSubview:self.myTabelView];
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { // 在这个方法里面设置cell的透明度
cell.backgroundColor = [UIColor colorWithRed:123.0 / 255.0 green:23.0 / 255.0 blue:45 / 255.0 alpha:0.1];
return cell;
}
相关文章推荐
- UITableView 基本使用方法总结
- UITableView一些易混属性和方法
- UITableView的详细讲解
- (转)UITableViewController重要配置方法和Delegate
- UITableView详细用法,UITableView指南,UITableView详细教程
- ios隐藏uitableview下面多余的tableview的线条
- ios关于tableView的重用
- IOS UITableView 实现LOL数据展示
- QT中设置按钮背景颜色
- iOS- UITableView
- 仿QQ控件图片下拉放大效果
- QQ分组
- 关于SearchaBar的bookMarks(代理方式实现)
- tableviewcell 侧滑删除 点击返回按钮 程序崩溃 [ tableView:canEditRowAtIndexPath:]:message sent to deallocated insta
- UIScrollView的使用大全--contentsize,contentInset和contentInset
- UITableView 实现异步加载图片之改进
- 解决IOS中UITableViewStylePlain 时对headerview的隐藏
- UITableView的优化
- UITableView进行讲解 真的是太详细了
- UITableView中设置section内行数以及配置cell的方法