Cell Separator Style
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.
精彩评论