iPhone UITableViewCell 编辑时的选择样式?

标签 iphone iphone-sdk-3.0 uitableview

我知道我可以更改 UITableViewCellselectionStyle 以使其在选择时突出显示蓝色或灰色,但我该如何更改它当处于编辑模式时?

我不希望单元格通常可以选择,只有在编辑模式下才可以选择,例如“时钟”应用程序的“闹钟”部分。

最佳答案

I dont want the cell to normally by selectable, only when in editing mode

在您的 UITableView 对象上,将其 allowsSelection 属性设置为 NO,并将其 allowsSelectionDuringEditing 属性设置为

关于iPhone UITableViewCell 编辑时的选择样式?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2527325/

相关文章:

iphone - 在 Interface Builder (XCode 4) 中设置 UIButton 拉伸(stretch)背景图像

iphone - Xcode IPA 问题

ios - 无法通过 heightForRowAt 获取 TableView 中的单元格

iphone - 拇指宽度与正常宽度不同的 UISlider 突出显示状态

ios - 应用程序崩溃,说集合表达式类型UIView *'可能不响应'countByEnumeratingWithState:object:count“'

iPhone UIView 动画

iphone - 加载某些网页时 UIWebview 崩溃

iphone - 动画导航栏标题

ios - 在函数 Swift 中访问数组的 indexPath

ios - 表格 View 标记多个单元格 Swift 3