how create this view. code for adding scroll view
yPos=0;
for (int i=0; i<24; i++) {
UIView *timeView=[[UIView alloc]initWithFrame:CGRectMake(71, yPos, 909, 60)];
timeView.userInteractionEnabled=TRUE;
timeView.exclusiveTouch=YES;
if (i==4) {
UIView *ssview=[[UIView alloc]initWithFrame:CGRectMake(0, 0, 100, 80)];
ssview.tag=1;
ssview.userInteractionEnabled=TRUE;
UILabel *recurenceId=[[UILabel alloc]init];
recurenceId.text=@"A12334";
[ssview addSubview:recurenceId];
ssview.backgroundColor=[UIColor orangeColor];
[timeView addSubview:ssview];
[ssview addGestureRecognizer:tap];
}
here ssview height is more than timeview.so it be added to next subview also
here every row is a subview of scroll view. Now i have to addd another view which is in green color.
I got you problem. It's not overlap your next cell, because your next cell lie on your previous cell and overlap previous cell's edge. Try to: remove cell (which will has a green view) from super view and add again with green view: