开发者

Use an image as the UITableView separator

开发者 https://www.devze.com 2023-01-09 22:08 出处:网络
I got an UITableView on my project and I need to customize the separator. I want to use an image instead of a color. I tried using the +colorWithPatternImage: 开发者_Python百科UIColor method with no l

I got an UITableView on my project and I need to customize the separator. I want to use an image instead of a color. I tried using the +colorWithPatternImage: 开发者_Python百科UIColor method with no luck.


use this code i use it in my application this will work

UIColor *color = [UIColor colorWithPatternImage:[UIImage imageNamed:@"image name"]];
[self.tableview setSeparatorColor:color];


As far as I know you can't. What you can do however is to set the separator to none and then add the image you want to use as a separator to the cell view.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号