大家好,我以编程方式分配了 UIView,就像,
detailView = [[UIView alloc] initWithFrame:CGRectMake(50, 100, 200, 200)];
detailView.alpha = 0.95;
detailView.layer.cornerRadius = 10;
detailView.layer.borderColor = [UIColor blackColor].CGColor;
detailView.layer.borderWidth = 1;
[distributorView addSubview:detailView];
然后我以编程方式在这个视图上添加了一些标签,比如,
arnNoDtlViewLbl = [[UILabel alloc] initWithFrame:CGRectMake(55,110,190,25)];
arnNoDtlViewLbl.text = [NSString stringWithFormat:@"%@",[brdArnNoAry objectAtIndex:rowOfTheCell]];
[arnNoDtlViewLbl setFont:[UIFont fontWithName:@"Verdana" size:13]];
arnNoDtlViewLbl.textColor = [UIColor darkGrayColor];
arnNoDtlViewLbl.numberOfLines=1;
[arnNoDtlViewLbl setBackgroundColor:[UIColor clearColor]];
[detailView addSubview:arnNoDtlViewLbl];
有这样的六个标签,还有一个关闭按钮来关闭视图,如果我将角落 redius 设置为该视图会发生什么,视图似乎在正确的位置,就像我给出的坐标一样,但是如果我删除角落redius,视图及其内容意味着标签和所有内容,超出了我给它们的坐标,,
这是视图,它的样子,整个代码在这里,