【编辑状态】
@interface UITableView : UIScrollView <NSCoding>
@property (nonatomic, getter=isEditing) BOOL editing; // default is NO.
- (void)setEditing:(BOOL)editing animated:(BOOL)animated;
结合VC中的edit方法使用,
-(void)setEditing:(BOOL)editing animated:(BOOL)animated{
if (editing) {
[theTableView setEditing:!theTableView.editing animated:YES];
}else{
[theTableView setEditing:!theTableView.editing animated:YES];
}
}
@property (nonatomic) BOOL allowsSelection; // default is YES. 支持选中
@property (nonatomic) BOOL allowsSelectionDuringEditing; // default is NO. 编辑时可以选中
@property (nonatomic) BOOL allowsMultipleSelectio; // default is NO. 支持多选
@property (nonatomic) BOOL allowsMultipleSelectionDuringEditing; // default is NO. 编辑时支持多选