Thursday, June 6, 2013

UITableView allowsSelectionDuringEditing example in Objective C (iOS).


UITableView allowsSelectionDuringEditing

A Boolean value that determines whether users can select cells while the receiver is in editing mode.

@property(nonatomic) BOOL allowsSelectionDuringEditing

Discussion of [UITableView allowsSelectionDuringEditing]
If the value of this property is YES , users can select rows during editing. The default value is NO. If you want to restrict selection of cells regardless of mode, use allowsSelection.

UITableView allowsSelectionDuringEditing example.
UITableView didSelectRow while editing?
Set table.allowsSelectionDuringEditing = YES;

Example of [UITableView allowsSelectionDuringEditing].
- (void)viewDidLoad {
    [tableView setEditing:YES animated:NO];
tableView.allowsSelectionDuringEditing = YES;
}

End of UITableView allowsSelectionDuringEditing example article.