Transparent background for UITableViewCellAccessoryDetailDisclosureButton
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.
Why doesnt the disclosure button take on the background color of the accessory?
Code:
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?
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.
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.
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| Transparent iPad Icon? | Bersaelor | 4 | 4,697 |
Aug 25, 2010 01:01 PM Last Post: KittyMac |
|
| Texture2D and other transparent objects | kappolo | 9 | 5,601 |
Apr 17, 2009 12:07 PM Last Post: AnotherJake |
|
| boton = picture png (transparent) | imaumac | 2 | 3,165 |
Oct 9, 2008 05:32 AM Last Post: imaumac |
|

