开发者

UITableViewCell's detaiTextLabel overlaps with custom subviews

开发者 https://www.devze.com 2023-01-19 08:23 出处:网络
I want to customize UITableViewCell by adding UILabel and two UIButton as its subview. The cell style will开发者_如何学Python be UITableViewCellStyleSubtitle and these three items would have to

I want to customize UITableViewCell by adding UILabel and two UIButton as its subview. The cell style will开发者_如何学Python be UITableViewCellStyleSubtitle and these three items would have to next (on the left) of detailTextLabel.But when i do this, detailTextLabel overlaps with these items and display clipped or partial subviews. Any way to handle out this without subclassing UITableViewCell if possible. Thanks.


do you want to display something with detailTextLabel? If not you could try to hide it.

cell.detailTextLabel.hidden = YES;

otherwise you could add another Label at a better position which displays your detailText

0

精彩评论

暂无评论...
验证码 换一张
取 消