【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(nonatomic, readonly) UITableViewStylestyle

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

Declaration

SWIFT

var rowHeight: CGFloat

OBJECTIVE-C

@property(nonatomic) CGFloatrowHeight

The style for table cells used as separators.

Declaration

SWIFT

var separatorStyle: UITableViewCellSeparatorStyle

OBJECTIVE-C

@property(nonatomic) UITableViewCellSeparatorStyleseparatorStyle

     UITableViewCellSeparatorStyleNone,// 没分割线
     UITableViewCellSeparatorStyleSingleLine,//单线
     UITableViewCellSeparatorStyleSingleLineEtched
// 双线?
 

The color of separator rows in the table view.

Declaration

SWIFT

var separatorColor: UIColor!

OBJECTIVE-C

@property(nonatomic, retain) UIColor*separatorColor

 

The effect applied to table separators.

Declaration

SWIFT

@NSCopying var separatorEffect: UIVisualEffect?

OBJECTIVE-C

@property(nonatomic, copy) UIVisualEffect*separatorEffect

 

The background view of the table view.

Declaration

SWIFT

var backgroundView: UIView?

OBJECTIVE-C

@property(nonatomic, readwrite, retain) UIView*backgroundView

 

Specifies the default inset of cell separators.

Declaration

SWIFT

var separatorInset: UIEdgeInsets

OBJECTIVE-C

@property(nonatomic) UIEdgeInsetsseparatorInset

 

Returns an accessory view that is displayed above the table.

Declaration

SWIFT

var tableHeaderView: UIView?

OBJECTIVE-C

@property(nonatomic, retain) UIView*tableHeaderView



Returns an accessory view that is displayed below the table.

Declaration

SWIFT

var tableFooterView: UIView?

OBJECTIVE-C

@property(nonatomic, retain) UIView*tableFooterView

 

The height of section headers in the receiving table view.

Declaration

SWIFT

var sectionHeaderHeight: CGFloat

OBJECTIVE-C

@property(nonatomic) CGFloatsectionHeaderHeight

 

The height of section footers in the receiving table view.

Declaration

SWIFT

var sectionFooterHeight: CGFloat

OBJECTIVE-C

@property(nonatomic) CGFloatsectionFooterHeight

 

The estimated height of rows in the table view.

Declaration

SWIFT

var estimatedRowHeight: CGFloat

OBJECTIVE-C

@property(nonatomic) CGFloatestimatedRowHeight

 

The estimated height of section headers in the table view.

Declaration

SWIFT

var estimatedSectionHeaderHeight: CGFloat

OBJECTIVE-C

@property(nonatomic) CGFloatestimatedSectionHeaderHeight

The estimated height of section footers in the table view.

Declaration

SWIFT

var estimatedSectionFooterHeight: CGFloat

OBJECTIVE-C

@property(nonatomic) CGFloatestimatedSectionFooterHeight

 

UITableView类用法大全:UITableView属性的更多相关文章

  1. 继承自UITableView的类自带tableView属性,不需要在创建该属性,因为父类UITableView已经创建.

      继承自UITableView的类自带tableView属性,不需要在创建该属性,因为父类UITableView已经创建.   https://www.evernote.com/shard/s227 ...

  2. MVC5 + EF6 + Bootstrap3 (9) HtmlHelper用法大全(下)

    文章来源:Slark.NET-博客园 http://www.cnblogs.com/slark/p/mvc5-ef6-bs3-get-started-httphelper-part2.html 上一节 ...

  3. MVC5 + EF6 + Bootstrap3 (8) HtmlHelper用法大全(上)

    文章来源:Slark.NET-博客园 http://www.cnblogs.com/slark/p/mvc5-ef6-bs3-get-started-httphelper-part1.html 上一节 ...

  4. MVC中HtmlHelper用法大全参考

    MVC中HtmlHelper用法大全参考 解析MVC中HtmlHelper控件7个大类中各个控件的主要使用方法(1) 2012-02-27 16:25 HtmlHelper类在命令System.Web ...

  5. 转帖: 一份超全超详细的 ADB 用法大全

    增加一句 连接 网易mumu模拟器的方法 adb  connect 127.0.0.1:7555 一份超全超详细的 ADB 用法大全 2016年08月28日 10:49:41 阅读数:35890 原文 ...

  6. 超全超详细的 ADB 用法大全

    原文地址:原文地址 基本用法 命令语法 为命令指定目标设备 启动/停止 查看 adb 版本 以 root 权限运行 adbd 指定 adb server 的网络端口 设备连接管理 查询已连接设备/模拟 ...

  7. ADB Usage Complete / ADB 用法大全

    ADB,即 Android Debug Bridge,它是 Android 开发/测试人员不可替代的强大工具,也是 Android 设备玩家的好玩具. 持续更新中,欢迎提 PR 和 Issue 补充指 ...

  8. Awesome Adb——一份超全超详细的 ADB 用法大全

    https://github.com/mzlogin/awesome-adb https://www.cnblogs.com/bravesnail/articles/5850335.html     ...

  9. MVC HtmlHelper用法大全

    MVC HtmlHelper用法大全HtmlHelper用来在视图中呈现 HTML 控件.以下列表显示了当前可用的一些 HTML 帮助器. 本主题演示所列出的带有星号 (*) 的帮助器. ·Actio ...

随机推荐

  1. 深入了解jquery中的键盘事件

    很多时候,我们需要获取用户的键盘事件,下面就一起来看看jquery是如何操作键盘事件的. 一.首先需要知道的是: 1.keydown() keydown事件会在键盘按下时触发. 2.keyup() k ...

  2. sql 命令操作用法

    ---恢复内容开始--- 远程登录数据库: mysql -u root -p 要求输入密码 ============== 查看数据库: show databases;============= 选择数 ...

  3. php中的NOTICE 的错误解决方法

    PHP新手NOTICE错误,特此写给那些遇到和我一样错误的朋友.   刚学习PHP,不久 最近在整留言板,刚才遇到个问题. 页面中,好多类似 Notice: in D:\wamp\www\study\ ...

  4. double类型字符串转换成一个纯数字字符串和一个小数点位数的c++代码

    今天工作中遇到一个要不一个double型的字符串转换成一个纯字数字符串和一个标志这个数字字符串的小数点有几位的int类型 例如:“23.123”--->“23123” + 3   比较简单.就是 ...

  5. ASP.NET MVC轻教程 Step By Step 7——改进Write动作方法

    在上一节我们使用强类型视图改进Write视图获得更好的智能感知和代码重构,现在可以进一步的改进动作方法. Step 1. 数据模型绑定 在Save方法中我们使用Request来获取表单传送的值,其实可 ...

  6. 完美方案——iOS的WebView自适应内容高度

    /////////////////////////////初始化,self.view是父控件///////////////////////////////// _webView = [[UIWebVi ...

  7. dispatch队列

    GCD编程的核心就是dispatch队列,dispatch block的执行最终都会放进某个队列中去进行,它类似NSOperationQueue但更复杂也更强大,并且可以嵌套使用.所以说,结合bloc ...

  8. 使用Unity游戏引擎在IOS模拟器中运行的方法

    在Unity编译IOS程序时,在Unity导航栏菜单中选择Edit->ProjectSettings ->Player(菜单项)选择IOS平台在下方SDK Version处选择运行设备为I ...

  9. django作models的UPDATE时,注意有过滤外键的情况

    就是如果要过滤的时候,存在外键,则需要取到原始字段的名称,不然就是ID. 原始名称以__(双下划线)引用. 如: def path2db(release_version, develop_versio ...

  10. 【POJ2478】Farey Seque

    题意: 就是求2~n的所有欧拉函数值的和,这里就用到了快速求欧拉函数的方法.(不能暴力求了,不然必定TLE啊) 说说欧拉筛法,感觉十分机智啊~~ 对于上述代码的几个问题: 1.问:为什么i%prime ...