I can not understand how to do it right. For example, I have a ViewController. It has a UIImageView and two Labels on top. In the application in most cases there is an Image and two Label. But sometimes it happens that there is a need to display video in a WebView between two Labels, how can I make it so that if there is a video, then between two Labels to put WebView?

IOS 9, Swift 3 platform

enter image description here

    1 answer 1

    Add a WebView there and depending on whether it is necessary to show it webView.hidden = true/false . And if you use auto layout , then add IBOutlets to the desired constraints and activate or deactivate them. myConstraint.active = true/false