Transparent background for UITableViewCellAccessoryDetailDisclosureButton

Posts: 38
Joined: 2008.09
Post: #1
I have a custom table cell, i set the accessory type to the disclosure button and set the background color, but the background still seems to be white.
cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:MonsterCellIdentifier] autorelease];
cell.contentView.backgroundColor = [UIColor colorWithRed:116.0/255.0 green:134.0/255.0 blue:56.0/255.0 alpha:1.0];
cell.accessoryType = UITableViewCellAccessoryDetailDisclosureButton;
cell.accessoryView.backgroundColor = cell.contentView.backgroundColor;

Why doesnt the disclosure button take on the background color of the accessory?
Quote this message in a reply
Posts: 133
Joined: 2008.05
Post: #2
The cell's background color gets set to white as it is being displayed - you can override this by implementing tableView:willDisplayCell:forRowAtIndexPath: in your delegate and changing the background color there.
Quote this message in a reply
Posts: 38
Joined: 2008.09
Post: #3
That changed the background color of the cell, but the accessory view still wasnt affected. So I instead created my own accessory view, created my own button to get the desired effect.
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Transparent iPad Icon? Bersaelor 4 8,398 Aug 25, 2010 01:01 PM
Last Post: KittyMac
  Scrolling content but not background omriykl 1 6,858 Jun 14, 2009 01:45 PM
Last Post: uripo
  OpenGL ES: Doing a background distortion soulstorm 2 4,849 May 14, 2009 04:00 PM
Last Post: soulstorm
  Texture2D and other transparent objects kappolo 9 10,027 Apr 17, 2009 12:07 PM
Last Post: AnotherJake
  Texture2D initWithString background tfifriday 8 8,897 Jan 20, 2009 09:57 PM
Last Post: AnotherJake