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. getInputStream与getReader方法

    getInputStream 方法用于返回的一个代表实体内容的输入流对象,其类型为javax.servlet.ServletInputStream. getReader方法用于返回的一个代表实体内容的 ...

  2. NSURLSession -- 实际开发中运用

    NSURLSession实际请求 iOS9使用http请求方法: 在工程info.plist文件内添加NSAppTransportSecurity键,类型为dictionary 在NSAppTrans ...

  3. asp.net学习

    http://www.cnblogs.com/fish-li/archive/2011/12/27/2304063.html

  4. Spring 操作Weblogic JDNI数据源

    <!--Data Source--> <jee:jndi-lookup id="nssb_1122_cs" jndi-name="jdbc/nssb_1 ...

  5. Innodb和MyISAM比较

    Innodb和MyISAM比较 (1)MyISAM类型的表强调的是性能,其执行速度比InnoDB类型更快 (2)MyISAM不支持事务.外键,InnoDB支持事务和外键 (3)MyISAM使用的表级锁 ...

  6. 基本数据类型的常量池与String类型常量池解析

    抛出样例: Integer a1  = new Integer(123);        Integer a2  = new Integer(123);        System.out.print ...

  7. SQL Server 中各个系统表的作用

    来源:http://www.hoky.org/blog/ sysaltfiles 主数据库 保存数据库的文件syscharsets 主数据库 字符集与排序顺序sysconfigures 主数据库 配置 ...

  8. BZOJ1666: [Usaco2006 Oct]Another Cow Number Game 奶牛的数字游戏

    1666: [Usaco2006 Oct]Another Cow Number Game 奶牛的数字游戏 Time Limit: 5 Sec  Memory Limit: 64 MBSubmit: 5 ...

  9. page.Response.WriteFile(newpath);

    page.Response.Clear();            page.Response.ClearHeaders();            page.Response.Buffer = fa ...

  10. (转载)javascript实现弹出对话框

    (转载)http://xiezezhun.iteye.com/blog/335898 简单对话框 一般常用的是 alert prompt confirm三种对话框 JavaScript代码: < ...