简体   繁体   中英

Autolayout and iPhone 6 / 6 Plus misplacements

This is strange and I don't find the cause... I have a view inside of another view, and I've set constraints for the child view to leading, top, trailing and bottom spaces to its parent view. I see this view correctly in iPhone 5, but in iPhone 6 the inner view does not keep the trailing constraint and "goes partially out" of the screen... why could thi be happening?

EDIT: This is the view configuration in storyboard:

在此处输入图片说明

the view at the back is a UIImageView that I've pin to leading, top, trailing and bottom of the superview. The interesting thing id the container: there I embed another view controller with its own view. Such view seems to take the room of the container when I run in iPhone 5, but in iPhone 6 the content of such container goes partially away to the right side of the screen...

删除Center-X和Proportional宽度约束,并替换为前导约束和尾随约束。

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