I want to change the color of detail disclosure button of a table cell. Thanks in advance.
You have to create a custom UIButton and set it as cell's accessoryView.
Your cellForRowAtIndexPath: will look something like the following,
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
//...
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:nil] autorelease];
UIButton *myAccessoryButton = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 24, 24)];
[myAccessoryButton setBackgroundColor:[UIColor clearColor]];
[myAccessoryButton setImage:[UIImage imageNamed:@"my_red_accessory_image"] forState:UIControlStateNormal];
[cell setAccessoryView:myAccessoryButton];
[myAccessoryButton release];
//...
}
//...
}
Change the tint of your tableview and cell will work too.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With