如何创建此视图。添加滚动视图的代码
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];
}
这里 ssview 高度大于 timeview.so 它也被添加到下一个子视图
这里每一行都是滚动视图的子视图。现在我必须添加另一个绿色视图。