Check mark represents the selected row at that time, left image is of iOS7 simulator and right is of iOS6 simulator.
The concern is UITableViewCellAccessoryDetailDisclosureButton in iOS7 has two parts, one part with right arrow accessory and other is the clickable "i" button rather than iOS6.
Is it a standard behaviour or am I doing something wrong, if it is standard then what should be the correct way of handling UITableViewCellAccessoryDetailDisclosureButton in iOS7?
mahboudz is correct in that the behaviours are now differentiated.
If you set only the DetailButton then in iOS7 you will see the (i) as a tap-able accessory button. But in iOS6 you won't see anything. So popping a detail view using accessoryButtonTappedForRowWithIndexPath
using SDK7.0 doesn't work on an iOS6 device as no accessory gets displayed.
Using the reverse config has similar issues, but you would be using didSelectRowAtIndexPath
instead.
The work around I found was to apply a similar approach to the dealing with the extendedLayouts in iOS7.
if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7) {
cell.accessoryType = UITableViewCellAccessoryDetailButton;
} else {
cell.accessoryType = UITableViewCellAccessoryDetailDisclosureButton;
}
So in iOS7 I use the DetailButton only and in pre-iOS7 versions I use the DetailDiscloureButton
.
This is the correct behavior. In iOS 7, you show both the "detail button" and the "disclosure indicator" using UITableViewCellAccessoryDetailDisclosureButton
.
If you'd only like the "i" button, you'd use UITableViewCellAccessoryDetailButton
and if you'd only like the "disclosure indicator, you'd use UITableViewCellAccessoryDisclosureIndicator
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With