[cell.detailTextLabel setBackgroundColor:[UIColor blackColor]];
doesn’t work. Any way to make it work?
Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The
UITableViewCelltextLabelanddetailTextLabelboth don’t behave like normalUILabel‘s. This probably is because a UITableViewCell draws it’s text instead of using aUILabelfor performance reasons. This results in inconsistent behaviour because the backgroundColor property is ignored by the cell’s drawing.Stick with the default
UITableViewCellif your desired functionality fits within what the Apple engineers have designed to be handled by a default cell. For all other functionality create your own subclass of UITableViewCell.