开发者

Cell Separator Style

开发者 https://www.devze.com 2023-01-26 16:00 出处:网络
How can we set Separator style at cell level. i.e. each cell will be having diffe开发者_运维技巧rent separator style?I don\'t think you can set the cell separator style per cell.You might try setting

How can we set Separator style at cell level. i.e. each cell will be having diffe开发者_运维技巧rent separator style?


I don't think you can set the cell separator style per cell. You might try setting the table view separator to UITableViewCellSeparatorStyleNone and then draw a custom "separator" yourself when you render out each cell.

Edit: How to do it depends a lot on your current code, what type of table, whether you are using a custom table cell, what exactly you mean by "different separator style", etc.

I have not tried this, but one option I can think of off the top of my head would be to use the UITableViewCell.backgroundView property. You could add a subview with a different color that is only a few pixels high along the bottom or you could create a UIImageView that fills the backgroundView and set the image to achieve the "different" separator.

0

精彩评论

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

关注公众号