I have a problem using the following code to set background of UITAbleview.
Can I have a alternative images on the cell inside the UITable by using the following code?
e.g. cell 1 using X.png and cell 2 using Y.png?
tableView.opaque = NO;
[tableView setBackgroundColor:[UIColor colorWithPatternImage:[UIImage imageNamed:@”wood.png”]]];
cell.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@”lightwood.jpg”]];
Thanks a lot.
At first take a view in your .h file
UIView *newView;declare its property and synhesize it at your .m fileNow in
cellForRowAtIndexPathIf any further question please knock me.
EDIT:
if any problem still now then check this link http://cocoawithlove.com/2009/04/easy-custom-uitableview-drawing.html