下面是官方的詳細(xì)解釋
A Boolean value that determines whether users can select a row.
**Declaration**
OBJECTIVE-C
@property(nonatomic) BOOL allowsSelection
**Discussion**
If the value of this property is YES (the default), users can select rows. If you set it to NO, they cannot select rows. Setting this property affects cell selection only when the table view is not in editing mode. If you want to restrict selection of cells in editing mode, use allowsSelectionDuringEditing.
**Availability**
Available in iOS 3.0 and later.
allowsSelection屬性只適應(yīng)于當(dāng) table view不是編輯模式的時(shí)候垒在。
當(dāng)你需要在編輯模式下限制cell的選擇蒜魄,那么你就要考慮使用allowsSelectionDuringEditing這個(gè)屬性。官方給出的詳細(xì)解釋如下
A Boolean value that determines whether users can select cells while the table view is in editing mode.
**Declaration**
OBJECTIVE-C
@property(nonatomic) BOOL allowsSelectionDuringEditing
**Discussion**
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.
**Availability**
Available in iOS 2.0 and later.
這里我就不再做詳細(xì)的說明。(第一次寫簡書谈为,寫的不對(duì)的地方旅挤,請多多指教。)