标签:
accessoryType
PropertyThe type of standard accessory view the cell should use (normal state).
Cell使用的标准附属视图类型
SWIFT
var accessoryType: UITableViewCellAccessoryType
OBJECTIVE-C
@property(nonatomic) UITableViewCellAccessoryType accessoryType
附属视图显示在表格视图正常状态下的cell右。标准的附属视图包括V型揭示标;查看UITableViewCellAccessoryType关于有效的accessoryType常量的描述。默认的accessoryType为UITableViewCellAccessoryNone。如果通过accessoryView属性设置了一个自定义的附属视图,那么这个属性的默认值就会被忽略。如果cell被激活了并且附属类型为UITableViewCellAccessoryDetailDisclosureButton, 那么附属视图就会追踪触摸,当敲击发生的时候,发送给数据源对象一个tableView:accessoryButtonTappedForRowWithIndexPath:消息。
如果附属类型的图片设置给了普通和编辑两种状态,它会在状态间交替隐退,使用editingAccessoryType属性来给编辑模式期间的cell设置附属类型。如果这个属性没有同时给两个状态设置,cell便会会动画滑入或者滑出。
The accessory view appears in the right side of the cell in the table view’s normal (default) state. The standard accessory views include the disclosure chevron; for a description of valid accessoryType
constants, see UITableViewCellAccessoryType. The default is UITableViewCellAccessoryNone
. If a custom accessory view is set through the accessoryView
property, the value of this property is ignored. If the cell is enabled and the accessory type is UITableViewCellAccessoryDetailDisclosureButton
, the accessory view tracks touches and, when tapped, sends the data-source object a tableView:accessoryButtonTappedForRowWithIndexPath:
message.
The accessory-type image cross-fades between normal and editing states if it set for both states; use the editingAccessoryType
property to set the accessory type for the cell during editing mode. If this property is not set for both states, the cell is animated to slide in or out, as necessary.
Available in iOS 2.0 and later.
accessoryView
PropertyA view that is used, typically as a control, on the right side of the cell (normal state).
SWIFT
var accessoryView: UIView?
OBJECTIVE-C
@property(nonatomic, strong) UIView *accessoryView
如果这个属性的值不是nil的话,UITableViewCell类便会使用一个给予的视图作为表格视图常规状态下的附属视图;它会忽视accessoryType属性的值。 被提供的附属视图可以是controller框架或者是一个自定义的视图。附属视图显示在cell的右边
If the value of this property is not nil
, the UITableViewCell
class uses the given view for the accessory view in the table view’s normal (default) state; it ignores the value of the accessoryType
property. The provided accessory view can be a framework-provided control or label or a custom view. The accessory view appears in the right side of the cell.
The accessory view cross-fades between normal and editing states if it set for both states; use the editingAccessoryView
property to set the accessory view for the cell during editing mode. If this property is not set for both states, the cell is animated to slide in or out, as necessary.
Available in iOS 2.0 and later.
editingAccessoryType
PropertyThe type of standard accessory view the cell should use in the table view’s editing state.
SWIFT
var editingAccessoryType: UITableViewCellAccessoryType
OBJECTIVE-C
@property(nonatomic) UITableViewCellAccessoryType editingAccessoryType
The accessory view appears in the right side of the cell when the table view is in editing mode. The standard accessory views include the disclosure chevron; for a description of valid constants, see UITableViewCellAccessoryType. The default is UITableViewCellAccessoryNone
. If a custom accessory view for editing mode is set through the editingAccessoryView
property, the value of this property is ignored. If the cell is enabled and the accessory type is UITableViewCellAccessoryDetailDisclosureButton
, the accessory view tracks touches and, when tapped, sends the delegate object a tableView:accessoryButtonTappedForRowWithIndexPath:
message.
The accessory type cross-fades between normal and editing states if it set for both states; use the accessoryType
property to set the accessory view for the cell during the table view’s normal state. If this property is not set for both states, the cell is animated to slide or out, as necessary.
Available in iOS 3.0 and later.
editingAccessoryView
PropertyA view that is used typically as a control on the right side of the cell when it is in editing mode.
SWIFT
var editingAccessoryView: UIView?
OBJECTIVE-C
@property(nonatomic, strong) UIView *editingAccessoryView
If the value of this property is not nil
, the UITableViewCell
class uses the given view for the accessory view in the table view’s editing state; it ignores the value of the editingAccessoryType
property. The provided accessory view can be a framework-provided control or label or a custom view. The accessory view appears in the right side of the cell.
The accessory type cross-fades between normal and editing states if it set for both states; use the accessoryType
property to set the accessory view for the cell during the table view’s normal state. If this property is not set for both states, the cell is animated to slide or out, as necessary.
Available in iOS 3.0 and later.
标签:
原文地址:http://www.cnblogs.com/baaingSheep/p/4612825.html