Iphone How to make transparent transparent transparent transparent?

Can someone explain to me how I can make the uifyviewcellaccessorydisclosureindicator background in a transparent UITableViewCell?

Now I am facing this problem:

alt text http://www.bubl3r.com/disclosure.jpg

+4
source share
3 answers

Just found the answer. It turns out that these are just 3 lines, and I need to define my own .png indicator with a transparent background:

UITableViewCell *bgView = [[UITableViewCell alloc] initWithFrame:CGRectZero]; bgView.backgroundColor=indexPath.row % 2? [UIColor colorWithRed:0.95 green:0.95 blue:0.95 alpha:1]: [UIColor whiteColor]; bgView.accessoryView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"disclosure.png"]]; cell.backgroundView=bgView; return cell; 
+5
source

In your UITableView deletion, override the delegate method tableView:willDisplayCell:forRowAtIndexPath: There, set the backgroundColor cell property to any color, and the background color of the auxiliary view should match.

+4
source

More details from anshuchimala answer:

 cell.contentView.backgroundColor=[UIColor grayColor];//or any color cell.backgroundColor=[UIColor grayColor]; cell.accessoryType=UITableViewCellAccessoryDisclosureIndicator; cell.accessoryView.backgroundColor=[UIColor clearColor]; 
+3
source

All Articles