My structure of views:
UITableView
UITableViewCell
UIScrollView
CustomView
UIButton
The problem is UIButton doesn\'t wo
I guess you need to set the button frame. By default if you use btn = [[UIButton alloc] init];
method to initialize button it will be UIButtonTypeCustom
. Also set a background color to it for debugging purpose to note down where the button is actually placed.
Now for your case you need to set the frame for that button like btn.frame = CGRectMake(0,0,100,100);
For the inner UIScrollView implement this delegate method.
- (BOOL)touchesShouldCancelInContentView:(UIView *)view
{
return ![view isKindOfClass:[UIButton class]];
}
This may work.