I have a UItableView (grouped style). I wanted to customize it so that it appears like a "Stick it" or a "Post it" with a yellow background interface.
Hence is added the following code
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
UIView *backgroundView = [[[UIView alloc] initWithFrame:CGRectZero] autorelease];
backgroundView.backgroundColor = [UIColor yellowColor];
cell.backgroundView = backgroundView;
cell.textLabel.backgroundColor=[UIColor yellowColor];
}
This actually worked. I was able to achieve the yellow background, but the separator line is missing. Can some1 help me out ?
Is this the best way to do it? Or should i create an image for the cell and use it as the backgroundView?