CEWendel/SWTableViewCell — pull request #104 by themaste (2014-02-27 20:15:21+00:00)
Title: Provide support for iOS accessory buttons

This patch allows accessory buttons to be used.

I'm holding off using this in my own app until a few issues are resolved. The overall swiping feature still needs work in regards to bouncing the cell back to either the right or left when the user releases their finger from the cell (similar to how iOS implements the feature). This is something I may add in the future. The other is that I'm not completely satisfied with this patch (more on that below).

In rare instances when the 'Delete' button (a right utility button) is tapped it doesn't perform the utility action unless you hit the 'Delete' text directly within the button. This happens more often after you swipe to the left and then swipe the parent view back to the right (so that it lays back over the child view). This is either due to the parent view canceling touches or the disclosure button canceling the touches -- even though neither of the views are laid over the child view. Another interesting thing is that this happens only when using the UITableViewCellAccessoryDetailButton button but not the UITableViewCellAccessoryDetailDisclosureButton. The UITableViewCellAccessoryDetailDisclosureButton is enclosed in a view (* DetailDisclosureView) that contains both the button and the chevron (the right arrow). This specialized view appears to move the hit box of the disclosure button with the view (which is exactly what you would expect). I tried enclosing the disclosure button within another view to try and contain the hit box of the detail button without any luck. It's a very strange issue. That being said, it works pretty darn well. It doesn't appear to change the behavior when no accessory buttons are present. So worst case, it works "less" well when accessory buttons are displayed in certain conditions, but no differently when no buttons are displayed.