0
A
回答
0
I found the answer.
UIView *newView124=[[UIView alloc]initWithFrame:CGRectMake(224, 90, 2, 48)];
newView124.backgroundColor=[UIColor grayColor];
[cell addSubview:newView124];
//Initialize Label
NSLog(@"cell width: %f",cell.frame.size.width);
UILabel *lbl1 = [[UILabel alloc]initWithFrame:CGRectMake(0, 90, 100, 50)];
[lbl1 setFont:[UIFont fontWithName:@"FontName" size:12.0]];
[lbl1 setTextColor:[UIColor blackColor]];
lbl1.text = @"1";
[cell addSubview:lbl1];
UIView *newView=[[UIView alloc]initWithFrame:CGRectMake(40, 90, 2, 48)];
newView.backgroundColor=[UIColor grayColor];
[cell addSubview:newView];
UILabel *lbl2 = [[UILabel alloc]initWithFrame:CGRectMake(42, 90, 130, 50)];
[lbl2 setFont:[UIFont fontWithName:@"FontName" size:12.0]];
[lbl2 setTextColor:[UIColor blackColor]];
lbl2.text = @"Hospitsal";
[cell addSubview:lbl2];
UIView *newView1=[[UIView alloc]initWithFrame:CGRectMake(172, 90, 2, 48)];
newView1.backgroundColor=[UIColor grayColor];
[cell addSubview:newView1];
UILabel *lbl21 = [[UILabel alloc]initWithFrame:CGRectMake(174, 90, 50, 50)];
[lbl21 setFont:[UIFont fontWithName:@"FontName" size:12.0]];
[lbl21 setTextColor:[UIColor blackColor]];
lbl21.text = @"Active";
[cell addSubview:lbl21];
UIView *newView12=[[UIView alloc]initWithFrame:CGRectMake(224, 90, 2, 48)];
newView12.backgroundColor=[UIColor grayColor];
[cell addSubview:newView12];
UIButton *modeButton = [[UIButton alloc] initWithFrame:CGRectMake(250, 100, 30, 25)];
UIImage *ddd=[UIImage imageNamed:@"pencil.png"];
[modeButton setImage:ddd forState:UIControlStateNormal];
///[btnEdit addTarget:self action:@selector(imSelected) forControlEvents:UIControlEventTouchUpInside];
[cell addSubview:modeButton];
// [cell.contentView bringSubviewToFront:btnEdit];
UIView *aView1=[[UIView alloc]initWithFrame:CGRectMake(0, 135,self.view.frame.size.width, 2)];
aView1.backgroundColor=[UIColor grayColor];
[cell addSubview:aView1];
+0
添加此行以释放内存,创建 –
+0
(UIView * eachView in [cell subviews]) [eachView removeFromSuperview]; –
+0
在添加主代码之前,请在注释中添加代码。 –
相关问题
- 1. 在UITableView中添加多列
- 2. 在uitableview中删除和添加行
- 3. 添加行的UITableView和Viewcontrollers
- 4. UITableView在顶部添加行
- 5. iOS在UITableView下面添加UIView
- 6. iOS使用数组添加到UITableView
- 7. 在iPhone中添加列和行到表?
- 8. iPhone:在UITableView中添加和删除行与编辑模式
- 9. ios在UITableView的标题视图中添加collectionView
- 10. 添加一个新行中一个UITableView
- 11. 在didSelectRowAtIndexPath + uiTableview上添加uiimageview和uilabel
- 12. iOS中的UIPicker和UITableView
- 13. 添加行和列的VB.NET
- 14. ArrayList使用array.add()添加行和列,如何添加行或列?
- 15. 添加到UITableView
- 16. 错误的UITableViewCellEditingStyle在UITableView中添加一行新行
- 17. 在UITableView上面添加UIView
- 18. 如何在iOS项目中添加和执行.sql文件?
- 19. 将单元格添加到iOS中的UITableView底部
- 20. 如何在UITableView中添加节标题
- 21. 如何在UIViewController中添加多个UITableView?
- 22. UITableView在iphone中添加控制问题
- 23. 如何在uitableview中添加导航栏
- 24. 如何在uitableview中添加搜索栏?
- 25. 在UITableView的标题中添加UISegmentedControl
- 26. 在UITableview中添加UITextField基本信息
- 27. UITableView在UITableViewController代码中添加UIView
- 28. 如何在UITableView中添加搜索栏喜欢iOS中的游戏中心?
- 29. ios - UITableView加载时冻结
- 30. 以静态UITableView编程添加行
IM没见过的兄弟 –
https://www.google.co.in/search?q=columns+and+rows+in+android+app&client=ubuntu&hs=任何链接或图片Ftg&channel = fs&source = lnms&tbm = isch&sa = X&ved = 0ahUKEwiN5uXh1qnMAhWEnJQKHTqNBSwQ_AUICCgC&biw = 1615&bih = 955#imgrc = hEitnf9Wwc8WTM%3A –
请找到链接。它看起来应该类似 –