それをどのように解決したかを共有します。UIScrollView をサブクラス化し、PlaceDetailsViewController のコンテナー ビューとして使用しました。
@interface PlaceDetailsContainerUIScrollView : UIScrollView
@end
@implementation PlaceDetailsContainerUIScrollView
- (UIView*)hitTest:(CGPoint)point withEvent:(UIEvent *)event
{
UIView *result = [super hitTest:point withEvent:event];
if ([result isKindOfClass:[UIView class]] && (result.tag == kDiscountListTableViewCellTag)
{
UITableView *tableView = (UITableView *) [[result.superview superview] superview];
return tableView;
}
return result;
}
@end
また、PlaceDetailsContainerUIScrollView.delaysContentTouches = YES および PlaceDetailsContainerUIScrollView.canCancelContentTouches = NO に設定することを忘れないでください。
また、DiscountListTableViewController メソッドに小さな修正が必要でした:
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
DiscountDetailsViewController *discountDetailsVC = [[DiscountDetailsViewController alloc] init];
//[self.navigationController pushViewController:discountDetailsVC animated:YES];
// self.navigationController is nill because it's not pushed on nav stack, so will grab the current one:
AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
[appDelegate.navigationController pushViewController:discountDetailsVC animated:YES];
}