Q:UITableView Cell中放入UIButton没有点击效果?
A: 如下~
// Set Cell Button highted cell上按钮点击效果
for (id view in self.tableView.subviews)
{
// looking for a UITableViewWrapperView
if ([NSStringFromClass([view class]) isEqualToString:@"UITableViewWrapperView"])
{
if([view isKindOfClass:[UIScrollView class]])
{
// turn OFF delaysContentTouches in the hidden subview
UIScrollView *scroll = (UIScrollView *) view;
scroll.delaysContentTouches = NO;
}
break;
}
}
self.tableView.delaysContentTouches = NO;
网友评论