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详情的更多相关文章

  1. iOS资讯详情页实现—WebView和TableView混合使用(转)

    iOS资讯详情页实现—WebView和TableView混合使用 如果要实现一个底部带有相关推荐和评论的资讯详情页,很自然会想到WebView和TableView嵌套使用的方案. 这个方案是WebVi ...

  2. iOS商品详情、ffmpeg播放器、指示器集锦、自定义圆弧菜单、实用工具等源码

    iOS精选源码 电商商品详情 Swift.两种方式实现tableViewCell拖拽功能 ffmpeg+openGL播放器 微信聊天表情雨.表情下落.表情动画 iOS指示器集锦 弹窗增加 picker ...

  3. iOS 证书详情介绍

    1.Certification(证书)安装证书后使这台电脑就有开发APP和真机调试的功能. 证书分为开发证书(Developer Certification)和发布证书(Distribution Ce ...

  4. 【IOS笔记】View Controller Basics

    View Controller Basics   视图控制器基础 Apps running on iOS–based devices have a limited amount of screen s ...

  5. Xcode的Architectures和Valid Architectures的区别,

    登录 | 注册 ys410900345的专栏 目录视图摘要视图订阅 学院APP首次下载,可得50C币!     欢迎来帮助开源“进步”     当讲师?爱学习?投票攒课吧     CSDN 2015博 ...

  6. 仿淘宝详情转场(iOS,安卓没有这功能)

    由于公司是做跨境电商的,所以对各大电商APP都有关注,最近看到淘宝iOS端(安卓没有)在商品详情点击加入购物车有一个动画效果特别赞,正好今天新版本上线,下午就抽了些时间研究了下. 主要思路是自定义转场 ...

  7. iOS 集成阿里百川最新版(3.1.1.96) 实现淘宝授权登录以及调用淘宝客户端商品详情页

      公司最近要做第三方登录,由于是做导购项目,必不可少的有淘宝的授权登录.本来就是一个授权登录,没什么大不了的.但淘宝的无线开放业务——阿里百川更新的最新版本3.1.1.96,开发文档不是不详细,是很 ...

  8. iOS - 小功能 跳转到淘宝或天猫的商品展示详情页

    最近做iOS项目的时候遇到一个需求,点击广告页,跳转到淘宝或天猫的商品详情页. 具体需要是这样: 1)安装了淘宝:跳转到淘宝详情页. 2)没装淘宝,装了天猫:跳转到天猫详情页 3)淘宝.天猫都没装:跳 ...

  9. iOS多线程的详情使用示例--简进祥

    大家都知道,在开发过程中应该尽可能减少用户等待时间,让程序尽可能快的完成运算.可是无论是哪种语言开发的程序最终往往转换成汇编语言进而解释成机器码来执行.但是机器码是按顺序执行的,一个复杂的多步操作只能 ...

  10. iOS开发——UI进阶篇(十)导航控制器、微博详情页、控制器的View的生命周期

    一.导航控制器出栈 1.initWithRootViewController本质 UIViewController *vc = [[OneViewController alloc] init]; // ...

随机推荐

  1. QNetworkRequest 请求类

    QNetworkRequest Class Header:    #include <QNetworkRequest>qmake:     QT += networkSince:     ...

  2. c++清除输入缓冲区之 sync() vs ignore()

    最近在写程序的时候总是不注意输入缓冲区内是否还有东西,导致出现了一些异常,调试了半天.所以来上一贴,学习注意,引以为戒! http://blog.chinaunix.net/uid-21254310- ...

  3. Spring MVC源码分析(续)——请求处理

    转自:http://blog.csdn.net/shi1122/article/details/8041017 (转移位置了,时光隧道:http://www.jmatrix.org/spring/50 ...

  4. Hibernate validator验证

    spring-mvc配置 <mvc:annotation-driven validator="validator" /> <bean id="valid ...

  5. 【HDOJ】1930 And Now, a Remainder from Our Sponsor

    简单字符串. #include <stdio.h> #define MAXLEN 160 char buf[MAXLEN]; ], parts[]; void getpart(int x) ...

  6. Node.js权威指南 (7) - 实现基于TCP与UDP的数据通信

    7.1 使用net模块实现基于TCP的数据通信 / 136 7.1.1 创建TCP服务器 / 136 7.1.2 socket端口对象 / 142 7.1.3 创建TCP客户端 / 151 7.1.4 ...

  7. ☀【Zepto】touch events

    https://github.com/madrobby/zepto jTouchhttps://github.com/liutian1937/jTouch iphone.ipod Touch.ipad ...

  8. 谷歌浏览器怎么调试js

    首先我们打开开发者工具,你可以直接在页面上点击右键,然后选择审查元素或者在Chrome的工具中找到或者你直接记住这个快捷方式: Ctrl+Shift+I (或者Ctrl+Shift+J直接打开控制台) ...

  9. js或者cs代码拼接html

    一:使用到的jQuery 文档操作方法 html() 设置或返回匹配的元素集合中的 HTML 内容. append() 向匹配元素集合中的每个元素结尾插入由参数指定的内容. empty() 删除匹配的 ...

  10. myeclipse如何修改Web项目名称

    1. 使用myeclipse进行Web项目开发时,有时候项目名称重命名了,但是WEB项目在tomcat里边的名称还是原来的名称,是需要重新命名的.下边详细介绍一下如果和修改web项目名称,myecli ...