I'm trying to make table cells a little more interesting by using a gradient.
What I've done is make a .xib file with just a 320x80 view with a PNG gradient (UIImageView) in it. Then in the code:
But I get this:
Notice how there is a gradient, but the textLabel has this block of white behind the text. How do I get rid of that?
What I've done is make a .xib file with just a 320x80 view with a PNG gradient (UIImageView) in it. Then in the code:
Code:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"poo"];
if (cell == nil)
{
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault
reuseIdentifier:@"poo"] autorelease];
NSLog(@"Couldn't grab dequeued cell, made a new one");
}
else
NSLog(@"Grabbed dequeued cell");
cell.textLabel.text = [list objectAtIndex:[indexPath row]];
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
//cell.imageView.image = [UIImage imageNamed:@"large.jpg"];
NSArray *b = [[NSBundle mainBundle] loadNibNamed:@"TableCellBackground" owner:self options:nil];
UIView *v = [b objectAtIndex:0];
cell.backgroundView = v;
return cell;
}
But I get this:

Notice how there is a gradient, but the textLabel has this block of white behind the text. How do I get rid of that?