My structure of views:
UITableView
UITableViewCell
UIScrollView
CustomView
UIButton
The problem is UIButton doesn't work when I touch it. I create it with code:
btn = [[UIButton alloc] init];
[btn setImage:image forState:UIControlStateNormal];
[btn addTarget:self action:@selector(tileTouchUpInside) forControlEvents:UIControlEventTouchUpInside];
btn.layer.zPosition = 1;
[self addSubview:btn];
I've also add this:
scroll.delaysContentTouches = NO;
scroll.canCancelContentTouches = NO;
But my button doesn't work anyway. I can't cancelContentTouches or set delay for UITableView because if I set it, UITableView stop scrolling verticaly.
Thanks for any help!