UITableView单面边框颜色? [英] UITableView one sided Border color?

查看:171
本文介绍了UITableView单面边框颜色?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想要一个像这样的桌面边框,只有左边是彩色的。

I'd like to have a tableview border styled like this one,only the left side is colored.

任何想法?

推荐答案

一个简单的方法是添加 UIImageView 到您的单元格,该单元格的宽度和高度与单元格的宽度相同( example )。另一种方法是使用图像作为每个单元格的背景,并在您将使用的实际图形中添加此边框( example )。如果你想在一个图层级别,一个好的开始是此示例。我希望能帮助!

A simple way would be to add a UIImageView to your cells that has a small width and the same height with the cell (example). Another approach would be to use an image as a background for each cell, and add this border in the actual graphic that you will use (example). And if you want to make it in a layer level, a good start is this example. I hope that helps!

这篇关于UITableView单面边框颜色?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆