//
// ViewController.m
// 透明table
//
// Created by LiuWei on 2018/4/23.
// Copyright © 2018年 xxx. All rights reserved.
// #import "ViewController.h" @interface ViewController ()<UITableViewDelegate,UITableViewDataSource> @property(nonatomic,strong)UITableView *table; @end @implementation ViewController - (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib. UIImageView *imgV = [[UIImageView alloc]initWithFrame:self.view.bounds];
imgV.image = [UIImage imageNamed:@"005.jpg"];
[self.view addSubview:imgV]; UITableView *table = [[UITableView alloc]initWithFrame:self.view.bounds style:UITableViewStylePlain];
table.delegate = self;
table.dataSource = self;
_table = table;
_table.backgroundColor = [UIColor clearColor]; [self.view addSubview:_table]; } -(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
return ;
} -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
UITableViewCell *cell = [[UITableViewCell alloc]initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:@"cellID"];
cell.textLabel.text = @"haha";
cell.backgroundColor = [UIColor clearColor];
cell.selectionStyle = UITableViewCellSelectionStyleNone;
return cell;
} - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ } - (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
} @end

透明的UITableView的更多相关文章

  1. 兼容sdk7&iOS7的issue解决小片段总结

    ios7新增加的icon尺寸: 76 x 76:Size for iPad 2 and iPad mini (standard resolution) 120 x 120 :Size for iPho ...

  2. 设置UITableView背景透明/监听cell左边的删除按钮的点击事件

    _tableView = [[UITableView alloc] init]; _tableView.delegate = self; _tableView.dataSource = self; _ ...

  3. UITableView优化

    作为iOS开发,UITableView可能是平时我们打交道最多的UI控件之一,其重要性不言而喻. 关于TableView,我想最核心的就是UITableViewCell的重用机制了. 简单来说呢就是当 ...

  4. 去掉UITableView多余的空白行分割线

    一.问题描述 在学习和开发中经常会遇到下面的问题,UITableView的UITableViewCell很少或者没有时,但UITableView有很多的空白行分割线.如下图: 如何去掉UITableV ...

  5. uitableview性能优化(转)

    这个感觉写的很好 收藏一下 以备后用 转自 http://www.cnblogs.com/pengyingh/articles/2354714.html 在iOS应用中,UITableView应该是使 ...

  6. UITableView详细注释

    style //普通 UITableViewStylePlain, //分组 UITableViewStyleGrouped //表格视图 UITableView * tableView = [[UI ...

  7. iOS中UITableView的一些设置

    不可滑动: ? 1 tableView.userInteractionEnabled = NO; 也可以在storyboard中的userInteractionEnable属性设置 显示导向箭头: ? ...

  8. UITableView优化的方法

    使用不透明视图. 不透明的视图可以极大地提高渲染的速度.因此如非必要,可以将table cell及其子视图的opaque属性设为YES(默认值). 其中的特例包括背景色,它的alpha值应该为1(例如 ...

  9. 【原/转】UITableview性能优化总结

    UITableView作为ios中使用最频繁的控件之一,其性能优化也是常常要面对的,尤其是当数据量偏大并且设备性能不足时.本文旨在总结tableview的几个性能优化tips,并且随着认识的深入,本文 ...

随机推荐

  1. 小程序的开发框架MINA及小程序的启动机制

    MINA框架分三个部分 视图层(View):有很多页面,每个页面有wxml和wxss组成的,视图结构和展现样式 逻辑层(App Service):处理事物逻辑的地方以及数据交互的服务中心 系统层(Na ...

  2. POJ 1066 Treasure Hunt [想法题]

    题目链接: http://poj.org/problem?id=1066 --------------------------------------------------------------- ...

  3. 631D Messenger

    题目大意 给你串s和t 但是每个串都被表示为多个二元组(x,y)表示字符x连续出现y次 问t在s中出现了多少次 分析 我们先将s和t每个串中二元组合并 即相邻两个二元组如果字符相等则将它们变为一个 特 ...

  4. JSONP的产生,和ajax的异同!

    先说说JSONP是怎么产生的: 其实网上关于JSONP的讲解有很多,但却千篇一律,而且云里雾里,对于很多刚接触的人来讲理解起来有些困难,着用自己的方式来阐释一下这个问题,看看是否有帮助. 1.一个众所 ...

  5. Ubuntu查看端口使用情况,使用netstat命令:

    https://www.cnblogs.com/fly-book/p/9827128.html

  6. vscode左侧文件不同颜色标识含义

    代码里的左侧颜色标识: 红色,未加入版本控制; (刚clone到本地)绿色,已经加入版本控制暂未提交; (新增部分)蓝色,加入版本控制,已提交,有改动: (修改部分)白色,加入版本控制,已提交,无改动 ...

  7. tomcat中的server.xml文件配置了URIEncoding="UTF-8"需要注意的问题

    1.      get请求传递中文时本地连正式库访问都正常,正式环境下单独访问报错 代码: 请求:project/projectInfo/export/?cks=’项目类型 public String ...

  8. sessionStorage、localStorage与cookie

    sessionStoage:容量大.安全.临时存储,跨页面 localStorage: 容量大.安全.永久存储.跨页面 应用: <!-- 存储页面 test-local --> <t ...

  9. Linux中ssh及scp的连接

    1. 当你想获取另外一台电脑上的数据时,可以使用这个命令 scp -P 10022 root@172.30.83.173:~/ubuntu1.tar ./ -r   代表传输文件夹,直接传文件可以不加 ...

  10. PHP学习 fwrite:Warning: fwrite(): supplied argument is not avalid stream resource in

    使用fwrite报错:Warning: fwrite(): supplied argument is not avalid stream resource in 解决方法:文件权限的问题,文件需要77 ...