1, iOS7 Tableviewcell Add a View,view above with a button, click the button does not perform a button click event
Workaround:
self.view.userInteractionEnabled = YES;
[Cell.contentview AddSubview:self.view]
The main problem is that the height of the cell is not as high as the view ability, so the view is not completely on the cell, so the Click event cannot be performed.
2, iOS7 Tableviewcell above has button, but button's click Effect is not, only long press can appear background picture
Workaround: Turn http://blog.csdn.net/zs449350247/article/details/21606973
One. The container of the IOS6 UITableViewCell Child View (subviews) is Uitableviewcellcontentview
the container for the UITableViewCell Child View (subviews) of the IOS7 is uitableviewcellscrollview
Since the IOS7 has been added to the action of the Edit button after sliding, so use ScrollView to handle ,uitableviewcellscrollview has the corresponding processing of the touch, Causes the button's click Effect to be masked, but the Click event is still in, so you can
1. Set the TableView. Delayscontenttouches = NO;
2. At the same time (uitableviewcell *) TableView: (uitableview *) TableView Cellforrowatindexpath: ( Nsindexpath*) Indexpath Proxy method Set the delay touch to No in ScrollView
for (ID obj in cell.) subviews)
{
if ([nsstringfromclass([obj class])isequaltostring:@ "Uitableviewcellscrollview"])
{
uiscrollview *scroll = (uiscrollview *) obj;
Scroll. delayscontenttouches =NO;
break;
}
}
;