1, iOS7 Tableviewcell Add a View,view above with a button, click the button does not run the button click event
The 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 run.
2, iOS7 Tableviewcell above has the button, but button's click Effect has not, only has the long press talent to appear the background picture
The 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 operation of the edit button after sliding, so use ScrollView to handle ,uitableviewcellscrollview has the corresponding processing of the touch, The Click Effect of the button is blocked, but the click event is still in, so you can
1. Set the TableView. Delayscontenttouches = NO;
2. At the same time in (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;
}
}
;