在UITableView中画竖线
来源:互联网 发布:局域网文件同步软件 编辑:程序博客网 时间:2024/05/21 13:32
1.在UITableView中画竖线
最近做ui,所以拜读一下,发现用这个办法,当tableView的style 设置成grouped的时候,无效,貌似。
2.方法2:UILabel 画边框
-(void)setLabelLayer:(NSDictionary*)dicParm
{
NSArray* labelArray=[dicParmobjectForKey:@"labelArray"];
float tableViewCellWidth=[[dicParmobjectForKey:@"tableViewCellWidth"]floatValue];
float tableViewCellHeight=[[dicParmobjectForKey:@"tableViewCellHeight"]floatValue];
float tabViewOrignY=[[dicParmobjectForKey:@"tabViewOrignY"]floatValue];
float tabViewOrignX=[[dicParmobjectForKey:@"tabViewOrignX"]floatValue];
float singleLabelLength=tableViewCellWidth/labelArray.count ;
for (int i=0; i<labelArray.count; i++)
{
UILabel* label=[labelArrayobjectAtIndex:i];
[label.layersetBorderColor:[[UIColorgrayColor]CGColor]];
[label.layersetBorderWidth:2];
label.frame=CGRectMake(tabViewOrignX+singleLabelLength*i, tabViewOrignY, singleLabelLength, tableViewCellHeight);
}
}
发现tableviewcell之间会有间隙3.在页面上,用label 的背景 和tableviewcell的背景拼接出来,一条竖线。
貌似默认的label 是透明的,我想要选择的是白色的,这两个选项看上去是一样的。
- 在UITableView中画竖线
- 在UITableView中画竖线
- 怎样在网页中画一条竖线?
- 怎样在网页中画一条竖线?
- android在XML中画横线、竖线和虚线
- 如何在网页中加入一条竖线
- 定积分竖线怎样在MathType中实现
- 设置 UITableView 边框 cell 边框 竖线
- 使用画图类在画图时,想画一条竖线
- 安卓在两个控件中间画一条竖线
- HTML在两个div标签中间画一条竖线
- 在UITableView中显示数据
- css画竖线
- CSS 画竖线
- asp.net中Treeview在IE7中出现竖线断裂的处理
- 网页中如何加竖线
- 数学公式中一对双竖线
- UITableView,在cell中添加按钮
- 传智播客-Java集合框架-day06
- KVM存储池\存储卷
- HTML5 拖拉的例子
- paip.提升安全---网站登录密码明文传输的登录高危漏洞解决方案
- 多服务器间共享Session的解决方案
- 在UITableView中画竖线
- 传智播客-JavaIO-day07
- java中serializable
- 输入内容(string类型的),统计字母/数字/空格的数量 [C#]
- 传智播客-JavaGUI-day08
- 爱 不说再见
- 使用闪联任意通将xp打造成wifi热点
- 传智播客-Java网络-day09
- javascript控制页面控件隐藏显示的两种方法