Placing a view directly on top of another of the same size

时间:2016-03-04 17:47:40

标签: ios uiview autolayout uiview-hierarchy

Ok, first what i'm trying to achieve:

A background video with interactive text over the top.

This text is being generated in the code i've written and is being presented in a UIView. The video is being played in an AVPlayerController, embedded in a UIContainerView.

My original plan was to set the UIView's width, height, and top to be equal to the UIContainerView's but this seems to be presenting me with a whole load of "Unable to simultaneously satisfy constraints" errors.

Am I going about this in the correct way? Has anyone tried to do something similar and succeeded?

Thanks, Joe

1 个答案:

答案 0 :(得分:0)

您可以尝试设置相等的宽度和相等的高度约束。如果这不能解决您的问题,您需要确定哪些约束确实存在冲突。