如何创建此视图。用于添加滚动视图
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];
[email protected]"A12334";
[ssview addSubview:recurenceId];
ssview.backgroundColor=[UIColor orangeColor];
[timeView addSubview:ssview];
[ssview addGestureRecognizer:tap];
}
这里ssview高度 代码比timeview.so它被加入到下一个子视图也
这里的每行是滚动视图的子视图更多。 现在我不得不添加另一个绿色的视图。
您的问题是什么? – Kepler
如果在第12行添加了greenView,它必须根据其高度在第13行上添加.. – sudheer
因此您想根据子视图更改第12行的高度? –