您的位置:首页 > 产品设计 > UI/UE

iOS开发--UItableView类属性

2015-04-03 14:02 375 查看
【storyboard创建tableView步骤】1.设置根视图2.选中视图,设置导航栏editor/embed in/navigationcontroller3.cell设置Identifier标识4.创建tableviewcontroller类,跟tableviewcontroller控件关联上5.storyboard会自动遵守<</span>UITabBarControllerDelegate,UITableViewDataSource>6.只需要实现必要的协议方法即可。【UITableView属性】UITableViewStyle 样式     UITableViewStylePlain,//只有一个分区     UITableViewStyleGrouped //可以有多个分区
style
Returns the style of the receiver. (read-only)

Declaration

SWIFT
var style: UITableViewStyle {
get }
OBJECTIVE-C
@property(nonatomic, readonly) UITableViewStyle style
rowHeight//cell行高
The height of each row (table cell) in the receiver.

Declaration

SWIFT
var rowHeight: CGFloat
OBJECTIVE-C
@property(nonatomic) CGFloat rowHeight
separatorStyleThe style for table cells used as separators.

Declaration

SWIFT
var separatorStyle: UITableViewCellSeparatorStyle
OBJECTIVE-C
@property(nonatomic) UITableViewCellSeparatorStyle separatorStyle
     UITableViewCellSeparatorStyleNone,// 没分割线     UITableViewCellSeparatorStyleSingleLine,//单线     UITableViewCellSeparatorStyleSingleLineEtched//双线?
separatorColor //分割线颜色
The color of separator rows in the table view.

Declaration

SWIFT
var separatorColor: UIColor!
OBJECTIVE-C
@property(nonatomic, retain) UIColor *separatorColor
separatorEffect//分割效果
The effect applied to table separators.

Declaration

SWIFT
@NSCopying var separatorEffect: UIVisualEffect?
OBJECTIVE-C
@property(nonatomic, copy) UIVisualEffect *separatorEffect
backgroundView //所有cell后面的大背景
The background view of the table view.

Declaration

SWIFT
var backgroundView: UIView?
OBJECTIVE-C
@property(nonatomic, readwrite, retain) UIView *backgroundView
separatorInset//ios7以后设置线是否占满
Specifies the default inset of cell separators.

Declaration

SWIFT
var separatorInset: UIEdgeInsets
OBJECTIVE-C
@property(nonatomic) UIEdgeInsets separatorInset
tableHeaderView//cell上部视图
Returns an accessory view that is displayed above the table.

Declaration

SWIFT
var tableHeaderView: UIView?
OBJECTIVE-C
@property(nonatomic, retain) UIView *tableHeaderView
tableFooterView //cell下部视图Returns an accessory view that is displayed below the table.

Declaration

SWIFT
var tableFooterView: UIView?
OBJECTIVE-C
@property(nonatomic, retain) UIView *tableFooterView
sectionHeaderHeight//分区标题区域高度,针对多个分区的
The height of section headers in the receiving table view.

Declaration

SWIFT
var sectionHeaderHeight: CGFloat
OBJECTIVE-C
@property(nonatomic) CGFloat sectionHeaderHeight
sectionFooterHeight//分区标题区域高度,针对多个分区的
The height of section footers in the receiving table view.

Declaration

SWIFT
var sectionFooterHeight: CGFloat
OBJECTIVE-C
@property(nonatomic) CGFloat sectionFooterHeight
estimatedRowHeight//ios7.0估算高度
The estimated height of rows in the table view.

Declaration

SWIFT
var estimatedRowHeight: CGFloat
OBJECTIVE-C
@property(nonatomic) CGFloat estimatedRowHeight
estimatedSectionHeaderHeight
The estimated height of section headers in the table view.

Declaration

SWIFT
var estimatedSectionHeaderHeight: CGFloat
OBJECTIVE-C
@property(nonatomic) CGFloat estimatedSectionHeaderHeight
estimatedSectionFooterHeight
The estimated height of section footers in the table view.

Declaration

SWIFT
var estimatedSectionFooterHeight: CGFloat
OBJECTIVE-C
@property(nonatomic) CGFloat estimatedSectionFooterHeight
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息