iOS-UITableCell详情
iOS-UITableCell详情
表示UITableViewCell风格的常量有:
UITableViewCellStyleDefault
UITableViewCellStyleSubtitle
UITableViewCellStyleValue1
UITableViewCellStyleValue2
下面是各种式样的图片:
系统自带cell的代码编写:
UITableViewCellStyleDefault
UITableViewCell *cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"cell"];
cell.textLabel.text = @"dafasdfa";
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
cell.detailTextLabel.text = @"detaildetaildetaildetaildetail";
cell.imageView.image = [UIImage imageNamed:@"屏幕快照 2015-05-17 22.01.27"];
UITableViewCellStyleValue1
UITableViewCell *cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:@"cell"];
cell.textLabel.text = @"dafasdfa";
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
cell.detailTextLabel.text = @"detaildetaildetaildetaildetail";
cell.imageView.image = [UIImage imageNamed:@"屏幕快照 2015-05-17 22.01.27"];
UITableViewCellStyleValue2
UITableViewCell *cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue2 reuseIdentifier:@"cell"];
cell.textLabel.text = @"dafasdfa";
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
cell.detailTextLabel.text = @"detaildetaildetaildetaildetail";
UITableViewCellStyleSubtitle
UITableViewCell *cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:@"cell"];
cell.textLabel.text = @"dafasdfa";
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
cell.detailTextLabel.text = @"detaildetaildetaildetaildetail";
cell.imageView.image = [UIImage imageNamed:@"屏幕快照 2015-05-17 22.01.27"];
下面是设置cell的属性介绍
//cell的右边辅助按钮的样式
cell.accessoryType = UITableViewCellAccessoryCheckmark;
//自定义cell右边的辅助按钮
cell.accessoryView = nil;
//自定义cell的背景
cell.backgroundView = nil;
//设置cell的contentview中的detail的文字内容
cell.detailTextLabel.text = @"";
//查看cell当前的编辑模式
int style = cell.editingStyle;
//设置当cell进入编辑模式时的辅助按钮样式
cell.editingAccessoryType = UITableViewCellAccessoryDisclosureIndicator;
//自定义cell进入编辑模式后辅助按钮
cell.editingAccessoryView = nil;
//获取cell的缩进级别
int level = cell.indentationLevel;
//获取cell的缩进宽度
float width = cell.indentationWidth;
//设置cell被选中时的背景
cell.selectedBackgroundView = nil;
//设置cell的选中状态样式
cell.selectionStyle = UITableViewCellSelectionStyleBlue;
//设置cell的contentview中的textlabel文字内容
cell.textLabel.text = @"";
iOS-UITableCell详情的更多相关文章
- iOS资讯详情页实现—WebView和TableView混合使用(转)
iOS资讯详情页实现—WebView和TableView混合使用 如果要实现一个底部带有相关推荐和评论的资讯详情页,很自然会想到WebView和TableView嵌套使用的方案. 这个方案是WebVi ...
- iOS商品详情、ffmpeg播放器、指示器集锦、自定义圆弧菜单、实用工具等源码
iOS精选源码 电商商品详情 Swift.两种方式实现tableViewCell拖拽功能 ffmpeg+openGL播放器 微信聊天表情雨.表情下落.表情动画 iOS指示器集锦 弹窗增加 picker ...
- iOS 证书详情介绍
1.Certification(证书)安装证书后使这台电脑就有开发APP和真机调试的功能. 证书分为开发证书(Developer Certification)和发布证书(Distribution Ce ...
- 【IOS笔记】View Controller Basics
View Controller Basics 视图控制器基础 Apps running on iOS–based devices have a limited amount of screen s ...
- Xcode的Architectures和Valid Architectures的区别,
登录 | 注册 ys410900345的专栏 目录视图摘要视图订阅 学院APP首次下载,可得50C币! 欢迎来帮助开源“进步” 当讲师?爱学习?投票攒课吧 CSDN 2015博 ...
- 仿淘宝详情转场(iOS,安卓没有这功能)
由于公司是做跨境电商的,所以对各大电商APP都有关注,最近看到淘宝iOS端(安卓没有)在商品详情点击加入购物车有一个动画效果特别赞,正好今天新版本上线,下午就抽了些时间研究了下. 主要思路是自定义转场 ...
- iOS 集成阿里百川最新版(3.1.1.96) 实现淘宝授权登录以及调用淘宝客户端商品详情页
公司最近要做第三方登录,由于是做导购项目,必不可少的有淘宝的授权登录.本来就是一个授权登录,没什么大不了的.但淘宝的无线开放业务——阿里百川更新的最新版本3.1.1.96,开发文档不是不详细,是很 ...
- iOS - 小功能 跳转到淘宝或天猫的商品展示详情页
最近做iOS项目的时候遇到一个需求,点击广告页,跳转到淘宝或天猫的商品详情页. 具体需要是这样: 1)安装了淘宝:跳转到淘宝详情页. 2)没装淘宝,装了天猫:跳转到天猫详情页 3)淘宝.天猫都没装:跳 ...
- iOS多线程的详情使用示例--简进祥
大家都知道,在开发过程中应该尽可能减少用户等待时间,让程序尽可能快的完成运算.可是无论是哪种语言开发的程序最终往往转换成汇编语言进而解释成机器码来执行.但是机器码是按顺序执行的,一个复杂的多步操作只能 ...
- iOS开发——UI进阶篇(十)导航控制器、微博详情页、控制器的View的生命周期
一.导航控制器出栈 1.initWithRootViewController本质 UIViewController *vc = [[OneViewController alloc] init]; // ...
随机推荐
- spm使用之二兼谈spm的贱格
上一篇还没写完, 因为我觉得太长了, 影响阅读, 就截断继续写. 因为还没有写到修改 创建模块的模板啊. 之所以想到要修改spm用来创建模块的模板, 是因为, 有一天我突然上不了网了, 发现spm完全 ...
- Java中getAttribute getParameter 区别
网上说的不少,发现都是同一篇,汗..... (1)HttpServletRequest类有setAttribute()方法,而没有setParameter()方法 (2)当两个Web组 ...
- jquery deferred
http://www.ruanyifeng.com/blog/2011/08/a_detailed_explanation_of_jquery_deferred_object.html http:// ...
- Ubuntu 12安装Virtualbox
用aptitude或者apt-get安装Virtualbox,安装过程中会报:”No suitable module for running kernel found [fail]“,安装未成功. 在 ...
- 解除網頁無法選取文字、鎖右鍵限制:Enable Copy(Chrome 擴充套件)
有些网页因会因为某些因素而禁止浏览者直接复制网页上的内容,虽然我们了解站方的意思,不过有些时候会造成一些不必要的困扰. Enable Copy 这款Chrome 扩充套件可以帮你一键解除封锁右键和选取 ...
- centos 6.5安装esx sdk
1. RHEL 6.3 64 bit yum install e2fsprogs-devel libuuid-devel yum install glibc.i686 yum install perl ...
- poj3167
这道题是一道kmp的扩展版的好题一串匹配一串很容易想到kmp,但是这里的匹配要求的是两个串的名次相同显然名次是会变的,为了方便,我们可以换一种表达对于两个等长的串的相同位置,名次相等就是在它之前比它小 ...
- (转载)不能启动虚拟机 Unable to open kernel device "\\.\Global\vmx86
(转载)http://blog.csdn.net/shenghuiping2001/article/details/7083153 今天系统加了内存条,设置变了一下: 就启动不起虚拟机了,报错: Un ...
- JavaScript高级程序设计19.pdf
注册处理程序 navigator.registerContentHandler("applicat/rss+xml","http://www.somereader.com ...
- 免费开源的android项目分享
免费开源的android项目分享:http://yun.baidu.com/share/link?shareid=2945649048&uk=3910054188