Programmatically create UIView with size based on subviews(labels)

New Member

I have a scenario where I'm needed to create an UIView completely programatically. This view is displayed as an overlay over a video feed and it contains 2 UILabels as subviews.

These labels can have varying widths and heights so I don't want to create a fixed frame for the UIView or the labels.

I've done this with programatic constrains without issue, but the problem is that the views are glitching when moving the phone and the framework that I'm using that does the video feed recommends not to use autolayout because of this exact problem.