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. Winbind authentication against active directory

    Winbind authentication against active directory Description This tip will describe how to configure ...

  2. ubuntu下openGL的配置方法

    This is a simple tutorial to show a new linux user (such as myself) how to setup freeglut and OpenGl ...

  3. pip assert_source_matches_version(self)版本验证报错Source in %s has version %s, which satisfies requirement %s的解决方式

    在win8.1下为了安装flask模块,开始安装pip,结果发生了上篇博客里面的错误ntpath join(path, *paths) 发生UnicodeDecodeError.解决之后继续发现版本验 ...

  4. HDFS 搭建记录

    1. 三台服务: 172.17.0.62(namenode) 172.17.0.68(datanode) 172.17.0.76(datanode) /etc/hosts包含的内容: 三台都包含的域名 ...

  5. 关于Java(常用数据类型)

    工作中,除非特殊需要,一般使用的数据类型较为单一. int int 是最常用的类型之一,一般能满足判断或循环的需求 float 或 double 两个浮点类型,可以在一定程度上确保数据的精度 BigD ...

  6. iReport中求和的问题

    数据库取出值TAX_AMT,但是不想在数据库里面计算,太麻烦,后面group by 字段太多.那就放到ireport里面去计算咯 在字段的如下位置进行计算吧.

  7. 支付宝openssl漏洞肆虐 互联网巨头称目前已修复

    支付宝openssl漏洞肆虐 互联网巨头称目前已修复 金山毒霸安全专家李铁军表示,这个漏洞使黑客可以远程读取https服务器的随机64KB内存,“只要这个黑客有耐心多捕获多分析那些64KB的数据,用户 ...

  8. Prince and Princess

    hdu4685:http://acm.hdu.edu.cn/showproblem.php?pid=4685 题意:有n个王子和m个公主,每个王子都会喜欢若干个公主,也就是王子只跟自己喜欢的公主结婚公 ...

  9. Spring的applicationContext.xml文件

    以下是详解Spring的applicationContext.xml文件代码:<!-- 头文件,主要注意一下编码 --><?xml version="1.0" e ...

  10. VARCHAR2字段关联

    SQL> create table a1(id int,name varchar2(10)); Table created. SQL> create table a2(id int,nam ...