博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
UITableView类用法大全:UITableView属性
阅读量:4357 次
发布时间:2019-06-07

本文共 2852 字,大约阅读时间需要 9 分钟。

【storyboard创建tableView步骤】
1.设置根视图
2.选中视图,设置导航栏editor/embed in/navigationcontroller
3.cell设置
Identifier标识
4.创建tableviewcontroller类,跟tableviewcontroller控件关联上
5.storyboard会自动遵守<</span>UITabBarControllerDelegate,UITableViewDataSource>
6.只需要实现必要的协议方法即可。
 

 
【UITableView属性】
  • UITableViewStyle 样式
     UITableViewStylePlain,//只有一个分区
     UITableViewStyleGrouped //可以有多个分区
 

Returns the style of the receiver. (read-only)

Declaration

SWIFT

var style: UITableViewStyle { get }

OBJECTIVE-C

@property(nonatomicreadonlystyle
  • //cell行高

The height of each row (table cell) in the receiver.

Declaration

SWIFT

var rowHeight: CGFloat

OBJECTIVE-C

@property(nonatomicrowHeight

The style for table cells used as separators.

Declaration

SWIFT

var separatorStyle: UITableViewCellSeparatorStyle

OBJECTIVE-C

@property(nonatomicseparatorStyle
     UITableViewCellSeparatorStyleNone,// 没分割线
     UITableViewCellSeparatorStyleSingleLine,//单线
     UITableViewCellSeparatorStyleSingleLineEtched // 双线?
 
  •  //分割线颜色

The color of separator rows in the table view.

Declaration

SWIFT

var separatorColor: !

OBJECTIVE-C

@property(nonatomicretain*separatorColor

 
  • //分割效果

The effect applied to table separators.

Declaration

SWIFT

@NSCopying var separatorEffect: ?

OBJECTIVE-C

@property(nonatomiccopy*separatorEffect

 
  •  //所有cell后面的大背景

The background view of the table view.

Declaration

SWIFT

var backgroundView: ?

OBJECTIVE-C

@property(nonatomicreadwriteretain*backgroundView

 
  • //ios7以后 设置线是否占满

Specifies the default inset of cell separators.

Declaration

SWIFT

var separatorInset: UIEdgeInsets

OBJECTIVE-C

@property(nonatomicseparatorInset

 
  • // cell上部视图

Returns an accessory view that is displayed above the table.

Declaration

SWIFT

var tableHeaderView: ?

OBJECTIVE-C

@property(nonatomicretain*tableHeaderView

  •  // cell下部视图

Returns an accessory view that is displayed below the table.

Declaration

SWIFT

var tableFooterView: ?

OBJECTIVE-C

@property(nonatomicretain*tableFooterView

 
  • //分区标题区域高度,针对多个分区的

The height of section headers in the receiving table view.

Declaration

SWIFT

var sectionHeaderHeight: CGFloat

OBJECTIVE-C

@property(nonatomicsectionHeaderHeight

 

The height of section footers in the receiving table view.

Declaration

SWIFT

var sectionFooterHeight: CGFloat

OBJECTIVE-C

@property(nonatomicsectionFooterHeight

 
  • //ios7.0 估算高度

The estimated height of rows in the table view.

Declaration

SWIFT

var estimatedRowHeight: CGFloat

OBJECTIVE-C

@property(nonatomicestimatedRowHeight

 

The estimated height of section headers in the table view.

Declaration

SWIFT

var estimatedSectionHeaderHeight: CGFloat

OBJECTIVE-C

@property(nonatomicestimatedSectionHeaderHeight

 

The estimated height of section footers in the table view.

Declaration

SWIFT

var estimatedSectionFooterHeight: CGFloat

OBJECTIVE-C

@property(nonatomicestimatedSectionFooterHeight

 

转载于:https://www.cnblogs.com/mawenqiangios/p/5885259.html

你可能感兴趣的文章
第八章 指针实验
查看>>
iOS 断当前时间是否在一天的某个时间段内。
查看>>
Jebref 的使用方法
查看>>
关于时间戳转成时间格式的相关问题
查看>>
洛谷 P1582 倒水 解题报告
查看>>
GnuPG高级指导(4)加密分发我的私钥
查看>>
PHP 模板引擎Smarty的基本语法
查看>>
transform
查看>>
[杂]右键拷贝文件路径
查看>>
Coursera机器学习——Recommender System测验
查看>>
继承与组合
查看>>
linux下多任务简单实现
查看>>
游标的使用【转】
查看>>
PADS Logic VX.2.3 修改软件界面语言
查看>>
福州大学软件工程1916|W班 第3次作业成绩排名
查看>>
ipop工具
查看>>
p/invoke碎片--对数组的封送处理
查看>>
mysql 数据表
查看>>
第十六天-linux文件系统特殊权限suid-sgid
查看>>
Centos7.5安装kafka集群
查看>>