简体   繁体   中英

How to remove right padding in UITableViewCell

I have a UITableViewCell in the Interface Builder and have added a label in it. The label has 3 constraints: leading, trailing and top. The bottom one is to a button, but I don't think it's relevant for the question.

The problem is that, even though the leading, trailing and top constraint have the same constant, there seems to be an inherent inset or padding in the leading part. This can be seen in this image: 在此处输入图片说明

How can I remove it? Or how can I at least replicate it for the top and trailing constraints?

Uncheck Relative to margin for this leading constraint and then set constant of this constraint to 8

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM