I have UITableView in my application.
Attributes: TableStyle = Plain, SeperatorStyle = single and SeperatorColor = black
What I want to do is that, I want to put a image (which a small strip), as separator for the table.
Please help me.
Regards,
Pratik
So, usually with an iPhone table, you should just use one of the built in styles: http://developer.apple.com/iphone/library/documentation/UIKit/Reference/UITableView_Class/Reference/Reference.html#//apple_ref/occ/instp/UITableView/separatorStyle
As an iPhone developer who has been down this road, I suggest you avoid images wherever possible, and use the API to build your app.
If you insist on your reckless course, or if you have a client demanding this or something, then what you can do is subclass UITableViewCell.
In your UITableViewCell subclass, you can add whatever UI elements you want to the contentView of the cell, including a separator image at the bottom of the cell.
So, here is an implementation of the delegate function that returns a table cell using a custom UITableViewCell:
And then here’s my simplified implementation of SavedTableCell.h:
And here is a simplified SavedTableCell.m: