在ios7中,UITableViewCellAccessoryDe​​tailDisclosureButton分为两个不同的附件button

ios7 UITableViewCellAccessoryDe​​tailDisclosureButtonios6 UITableViewCellAccessoryDe​​tailDisclosureButton

复选标记表示当时选中的行,左图是iOS7模拟器,右图是iOS6模拟器。

关注的是UITableViewCellAccessoryDetailDisclosureButton in iOS7 has two parts, one part with right arrow accessory and other is the clickable "i" button rather than iOS6. 这是一个标准的行为,或者我做错了什么,如果它是标准的,那么应该是在iOS7中处理UITableViewCellAccessoryDe​​tailDisclosureButton的正确方法?

mahboudz是正确的,现在的行为是有区别的。

如果你只设置DetailButton然后在iOS7中,你会看到(i)作为可点击的附件button。 但在iOS6中,你什么都看不到。 因此,在iOS6设备上使用SDK7.0使用accessoryButtonTappedForRowWithIndexPathpopup详细信息视图,因为没有附件显示。

使用相反的configuration有类似的问题,但你会使用didSelectRowAtIndexPath来代替。

我发现的工作是应用类似的方法来处理iOS7中的extendedLayouts。

 if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7) { cell.accessoryType = UITableViewCellAccessoryDetailButton; } else { cell.accessoryType = UITableViewCellAccessoryDetailDisclosureButton; } 

所以在iOS7中,我只使用DetailButton,在iOS7以前版本中使用DetailDiscloureButton

这是正确的行为。 在iOS 7中,您使用UITableViewCellAccessoryDetailDisclosureButton显示“详细信息button”和“披露指标”。

如果你只喜欢“我”button,你会使用UITableViewCellAccessoryDetailButton ,如果你只喜欢“披露指标,你会使用UITableViewCellAccessoryDisclosureIndicator