I need to display a bunch of UITableViewCell
in my iPhone application. Sample look below. I know how I can enable accessory view and image to UITableView cell
Maybe my FavStarControl is what you need? ;)
This Matt Gallagher post helped me a ton when dealing with custom TableView cells http://cocoawithlove.com/2009/04/easy-custom-uitableview-drawing.html.
Summary 1) Do not subclass UITableViewCell 2) In the cellForRowAtIndexPath method, layout your custom subviews on top of the dequeued UITableViewCell.
To add a star just use a UIButton with the default image of a unhighlighted star and a selected image of a highlighted star.
UITableViewCell
NSMutableArray *starArray
and CFFloat
rating inside the interfaceinside the cellForRowAtIndexPath
rating = any float value that can be 0,0.5,1,1.5
.....
and call (void)rightImageSet
: this method will fill in all the images string you required for the particular rating.
In rightImageSet
apply the logic
In a case anything is not clear comment
I think you may find everything you need here : http://github.com/eisernWolf/TouchCustoms
Either have a look at the code to have an idea of the code you need to use or just implement directly their source code into your project (do not forget to read carefully the license ;))
But in my opinion, it should be fairly easy to make your own custom rating system :
Okay, that's a summary :D but it shouldn't take too much time to build ;)