1
A
回答
1
一个简单的方法是将UIImageView
添加到与单元格宽度相同且高度相同的单元格中(example)。另一种方法是使用图像作为每个单元格的背景,并在您将使用的实际图形中添加此边框(example)。如果你想在层次上做到这一点,一个好的开始是this example。我希望这有助于!
5
我能想到的最简单方法是在内容视图中添加少许的看法:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:CellIdentifier] autorelease];
//Just a small view
UIView *lineView=[[UIView alloc] initWithFrame:CGRectMake(X_POS, Y_POS, LINE_WIDTH, CELL_HEIGHT)];
[lineView setBackgroundColor:[UIColor redColor]];
[[cell contentView] addSubview:lineView];
[lineView release];
}
return cell;
}
相关问题
- 1. 设置UITableView部分边框颜色
- 2. 如何更改UITableView边框的颜色?
- 3. 边框颜色
- 4. 边框颜色
- 5. 行边框颜色
- 6. LinkLabel边框颜色
- 7. ListView边框颜色
- 8. NSView边框颜色
- 9. Photoshop颜色边框黑色
- 10. 框架边框颜色
- 11. QTreeView边框/框架颜色
- 12. 边框颜色忽略我的颜色
- 13. JavaScript的边框颜色/颜色样式
- 14. VB更改颜色边框菜单条
- 15. 单击时设置边框颜色
- 16. jQuery UI的菜单边框颜色
- 17. UITableView单元格textLabel颜色
- 18. 红色文本框边框颜色
- 19. WPF SystemColors:TextBox边框的颜色
- 20. JOptionPane边框的颜色
- 21. 的UIImageView边框颜色
- 22. ImageView上边框的颜色
- 23. Android按钮边框颜色
- 24. 更改NSWindow边框颜色
- 25. 边框颜色不变
- 26. 更改球边框颜色
- 27. CSS3动画边框颜色
- 28. Groupbox边框颜色变化
- 29. CSS3智能边框颜色
- 30. Css渐变边框颜色
许多想法!你目前的做法是什么?你有什么问题? – phi 2012-03-03 07:26:51
我尝试使用CALayer和SetBorderWidth和SetBorderColor,但它设置了整个边界。我只想要在广告牌应用照片中显示的左侧。 – 2012-03-03 07:29:06
在tablewview上方添加不透明视图,您将会看到它。另外,如果单元格之间没有分隔符,则可以将这种视图添加到它们中。 – 2012-03-03 07:39:34