//
// 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. unity项目警告之 LF CRLF问题

    unity中创建的脚本,以LF结尾. Visual studio中创建的脚本,以 CRLF结尾. 当我们创建一个unity脚本后,再用VS打开编辑保存后,这个文件既有LF结尾符,也有CRLF结尾符. ...

  2. Win32下session和window station以及desktop一些介绍和应用

    会话(session).工作站(WindowStation).桌面(Disktop).窗口(window) https://blog.csdn.net/hlswd/article/details/77 ...

  3. pve之命令

    pvesr list ha-manager status pvecm nodes pvecm status pveperf qm list root@cu-pve06:~# pvesr list Jo ...

  4. 初次打开jenkins页面一片空白的解决办法

    安装完成jenkins后,点击[使用admin账号继续]后,页面一片空白的解决办法: step1: Jenkins插件管理-高级设置界面==> http://localhost:8080/plu ...

  5. idea中配置Resin运行环境

    文章目录 背景 下载resin 配置idea 背景 为了能够读Resin的源码,只看源码看不到值,故想在idea中通过断点查看. 下载resin https://caucho.com/products ...

  6. 解决Sql Server服务远程过程调用失败

    方法一:修复Sql Server: 修复过程中若遇到:重新启动计算机失败, 1.按下组合键[Win]+[R],调出运行窗口 2.输入“regedit”,在注册表左侧目录栏中找到如下位置:“HKEY_L ...

  7. html+css+js实现简单登陆注册页面

    先看一下最终效果,登陆和注册 背景图片: 附源码: login.html <!DOCTYPE html> <html lang="en"> <head ...

  8. 《JAVA设计模式》之观察者模式(Observer)

    在阎宏博士的<JAVA与模式>一书中开头是这样描述观察者(Observer)模式的: 观察者模式是对象的行为模式,又叫发布-订阅(Publish/Subscribe)模式.模型-视图(Mo ...

  9. phpcms批量更新内容页只更新一点就返回问题

    phpcms批量更新内容页只更新一点就返回问题 给caches目录增加写入权限

  10. [eclipse相关] 001 - 启动+运行优化

    本随笔参考了其他博客内容,且在验证有效之下才或誊抄或摘录或加上自己经验组合而成. 参考博客: 1,http://zwd596257180.gitee.io/blog/2019/04/17/eclips ...