简体   繁体   中英

iOS TableView and prototypecell constraints not working properly

I have a tableView with a prototypeCell.

I have added constraints to make the tableView take up the whole view:

在此处输入图片说明

I've added a "grey area" to the bottom of my prototypecell that take up 100% of the width.

However when i run the app there is a large area above the first tableCell, and the grey-area doesnt have 100% width:

在此处输入图片说明

What have I done wrong? Constraint issue?

You should uncheck Constrain to margins and may be adjust your constraint's values to make your grey view full width.

Regarding white space on top - looks like it's something wrong with your tableView settings, not cells

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