简体   繁体   中英

iPhone: Auto Layout Not Working

I have a problem with autolayout. The Table View below the Image View should resize to fill the whole space below when the App runs on an iPhone 5, but it doesn't. What is the problem?

在此输入图像描述

Your table view should have a vertical spacing constraint to the image view and another one to the bottom of the screen. It should have no height constraint.

After Edit:

I'm not sure what all your constraints are. It seems that something needs a fixed height (or some way to tell the system what the relative heights of the image view and table view are). It worked fine for me to give the image view a fixed height, and with these constraints for the image view and table view:

image view:

在此输入图像描述

table view:

在此输入图像描述

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